ChibiOS, STM32 and chprintf

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

Moderator: RoccoMarco

Post Reply
rpcaldeira
Posts: 9
Joined: Sat Jun 14, 2014 5:01 pm

ChibiOS, STM32 and chprintf

Post by rpcaldeira »

Hey guys! I'm having a small problem, but I'm sure that this will be a piece of cake for you guys.

I have outputs that are sent at least with a second apart, but they are only printed at the same time. Is there any way to force the flushing of the stdout buffer?

Thanks in advance for your help!

Rui
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: ChibiOS, STM32 and chprintf

Post by Giovanni »

There is no stdout buffer using chprintf() the transmission begins as soon the first char is inserted in the output queue.

Giovanni
rpcaldeira
Posts: 9
Joined: Sat Jun 14, 2014 5:01 pm

Re: ChibiOS, STM32 and chprintf

Post by rpcaldeira »

And there is a dedicated thread that handles that queue?

It's because I'm writing in one thread and then I put that thread to sleep and the feeling i'm getting is that the output is only being written after that thread goes to sleep

Rui
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: ChibiOS, STM32 and chprintf

Post by Giovanni »

No dedicated thread, the queue is emptied by an ISR. This makes me thing you could have a thread with disabled ISRs, you should enable the debug options in chconf.h and see if something is reported. The state checker should find that kind of errors.

Giovanni
rpcaldeira
Posts: 9
Joined: Sat Jun 14, 2014 5:01 pm

Re: ChibiOS, STM32 and chprintf

Post by rpcaldeira »

Thanks, I will try that :)
Post Reply