Page 1 of 1

chprintf idle loop in STM32f407discovery

Posted: Sat May 17, 2014 11:11 pm
by Trelaron
Hi all,
I'm not an expert of this matter but I'm trying to use ChibiOS on my STM32 for some experiment for my thesis.

My problem is:

when I use chprintf, sometime, ChibiOS go in infinite waiting in "_idle_loop".

I use USB communication (I copied the code for using communication with shell of Chibios from a demo of ChibiStudio 5 - this is the verion that i still use). I use sduStart also in a correct way, I think.
The very strange think is that SOMETIME it happens!

Can someone give me some tips?

Thanks! :D

Re: chprintf idle loop in STM32f407discovery

Posted: Sun May 18, 2014 8:10 am
by Giovanni
Which version are you using? which module contains _idle_loop? could it be _idle_thread instead?

In general enable the debug options in chconf.h, those are able to detect a lot of problems. Intermittent errors are not that unusual, quite the opposite. Often the cause is a stack overflow somewhere.

About your problem, if you are printing to a serial port then it is probably caused by a recently discovered bug in the serial driver, it will be fixed in 2.6.5, you may checkout the code in the repository from the 2.6.x branch, the fix is already there.

Giovanni

Re: chprintf idle loop in STM32f407discovery

Posted: Sun May 18, 2014 11:25 am
by Trelaron
Thank you very much!!! I donwloaded new version of ChibiStudio and my problem look like solved :)