chprintf idle loop in STM32f407discovery

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
Trelaron
Posts: 2
Joined: Sat May 17, 2014 10:40 pm

chprintf idle loop in STM32f407discovery

Post 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
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: chprintf idle loop in STM32f407discovery

Post 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
Trelaron
Posts: 2
Joined: Sat May 17, 2014 10:40 pm

Re: chprintf idle loop in STM32f407discovery

Post by Trelaron »

Thank you very much!!! I donwloaded new version of ChibiStudio and my problem look like solved :)
Post Reply