Page 2 of 3

Re: ChibiOS on iNemo v1

Posted: Wed Dec 14, 2011 10:12 pm
by kulve
Giovanni wrote:There must be something wrong with integration or tools, are you using the standard Makefiles? compiler version? standard compiler options? using the correct linker script? including the correct directories in Makefile? using the standard startup code? Linked libraries with project?
Giovanni


We'll double check those. Btw, what compiler do you use? And what compiler options (I think we use the same few as in most of the demos)?

Thanks.

Re: ChibiOS on iNemo v1

Posted: Wed Dec 14, 2011 10:18 pm
by Giovanni
I usually use YAGARTO, any version of it has been tested, currently I am using version 4.6.2. I also test using the current CodeSourcery toolchain. In general GCC is without problems.

The options are those you can see in the standard makefiles.

Giovanni

Re: ChibiOS on iNemo v1

Posted: Thu Dec 15, 2011 7:03 am
by zuh
The port_init() was a red herring, the toolchain doesn't like -O2 when debugging. With -O0, my board files and the STM32F103xE.ld linker script the ADC example seems to be running.

And furthermore, I realized I was calling adcStartConversion() inside the main loop. Taking that outside the loop makes my program run (I won't say work until I make sense of the data). So looks like this was just invalid user error all along... :oops:

Though, this doesn't explain the I²C issues but maybe those are something else.

I'm using the free Mentor Graphics Sourcery toolchain (arm-2011.03-42-arm-none-eabi) btw.

Re: ChibiOS on iNemo v1

Posted: Thu Dec 15, 2011 7:08 am
by zuh
One additional observation, looks like the circular buffer option of ADCConversionGroup needs to be TRUE if using the continuous conversion. Otherwise it'll read once and hang.

So this was a mixture of things and I never before managed to get them all right in the same go...

Re: ChibiOS on iNemo v1

Posted: Thu Dec 15, 2011 7:28 am
by zuh
One additional additional observation ;)

Although the continuous conversion runs (ie. the conversion callback is called), the led stays dead.

So the main loop effectively is not running. There's something fishy still here...

Re: ChibiOS on iNemo v1

Posted: Fri Dec 16, 2011 11:46 am
by kulve
Giovanni, we updated the ADC branch in github:

https://github.com/snowcap-electronics/ ... src/main.c

Do you have more hints why our main loop seems to be getting stucked while the ADC callback gets still called?

The iNEMO has a high density F103 and I noticed that none of the demos in ChibiOS uses that. But I guess the medium density MCU is close enough from the OS point of view for testing etc.

Thanks for your help!

Re: ChibiOS on iNemo v1

Posted: Fri Dec 16, 2011 1:57 pm
by Giovanni
The best thing you can do is to package a small project (remove anything not strictly needed to showcase the problem) that I can just compile and run. I don't have HD devices but I can test on MD and XL.

Giovanni

Re: ChibiOS on iNemo v1

Posted: Tue May 03, 2016 1:40 pm
by chrismerck
@zuh, @kulve: Did you ever resolve your issue? I'm running into a similar issue on STM32F205 project with ChibiOS 3.x. Thanks!

Re: ChibiOS on iNemo v1

Posted: Tue May 03, 2016 1:46 pm
by RoccoMarco
chrismerck can you explain your problem? I am working on STM32F207. Maybe I can help you.
Ciao,
RM

Re: ChibiOS on iNemo v1

Posted: Tue May 03, 2016 1:49 pm
by kulve
chrismerck wrote:@zuh, @kulve: Did you ever resolve your issue? I'm running into a similar issue on STM32F205 project with ChibiOS 3.x. Thanks!


I don't think we did. But that's a long time ago. Looking at the thread now, we had several issues in there. Our overall SW wasn't that good, so I'm sure we just had too many bugs in our code.