Showing results for 
Search instead for 
Did you mean: 

STM32F2 USART IDLE Detection

Associate II
Posted on June 30, 2012 at 15:22


I'am using two STM32F207IG with the UART1's configured as RS232 (8n1,115200, no flowcontrol, asynch) connected via null-modem.

Each 10 �s the master sends a byte to the slave (status bit USART_SR_TC is set).

My problem:

Only at every second received byte the status bit USART_SR_IDLE is set.

I can't fix, if this a a problem of the master/transmitter of slave/receiver.



Posted on June 30, 2012 at 15:56

Get a scope and confirm you have a frame of idle time between the bytes. The assertion of TC means the last bit exited the shift register, you'd need to wait ~10 bit times beyond that to meet the idle criterion of the receiver.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Associate II
Posted on June 30, 2012 at 16:17

even if I set the time between two bytes to 10 seconds, I get the same result.

bytes 1,3,5,... IDLE Flag cleared

bytes 2,4,6,... IDLE Flag set

I have no scope - see you another way to fix this problem?


Andrew Neil
Evangelist III
Posted on June 30, 2012 at 20:01

''I have no scope''

Trying to do embedded development without a scope is a bit like trying to do carpentry without a saw...