cancel
Showing results for 
Search instead for 
Did you mean: 

UART responding to wrong baudrate: HAL_UART_Receive() receives symbols, but HAL_UART_Receive_IT() no interrupt

marcus2
Associate II
Posted on December 01, 2016 at 11:45

Hi,

I found that a uart (standard configuration RX/TX, no flow ctrl) may receive some (wrong) symbols in polling mode but there is no interrupt at all in interrupt mode. Both mechanisms, of course, work fine if correct baudrate is configured.

Why the difference?

Regards

Marcus

#uart-interrupt-polling-baudrate
3 REPLIES 3
Posted on December 05, 2016 at 20:28

Doctor, doctor!  When I drink my coffee and leave the spoon in, it hits me in the forehead and I get a Headache!!

Doctor replies:  Don't leave the spoon in your coffee when you drink it!.

Why are you asking : 'if I run the component out of spec in two different ways, I get two different results.  But if I run it in spec everything works fine.'

How about- don't run it out of spec?

Posted on December 06, 2016 at 04:11

Is it possible that polling mode code clears framing errors, or others, that would stop an RXNE interrupt?

You'd want to review the USART status register bits and configuration in the failing state.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on January 10, 2017 at 09:24

This what happens: depending on the baudrate RXNE is sometimes set, sometimes not - which is probably due to framing errors. In the latter case, there is no interrupt. Clive, thanks for your hint.