cancel
Showing results for 
Search instead for 
Did you mean: 

Writing to UART_DR register clears the RXNE bit?

samuel239955
Associate
Posted on November 09, 2011 at 16:38

FIXED!!!!

I was using a Union Structure, which required a read to the register..

I have STM32F207 chip...

Using UART2, I've tried to do bidirectional data sending and receiving.  However, I've noticed that when I write a byte to UART_DR, the RXNE bit is clearing.  This bit should only clear when I READ UART_DR. 

''In single buffer mode, clearing the RXNE bit is performed by a software read to the

USART_DR register. The RXNE flag can also be cleared by writing a zero to it. ...'' ( RM0033 pg 610 - DOCID 15403 Rev 3)

Help! Not sure what's going on. Is this a problem with the chip?

Thanks!

Sam

#must-be-a-hardware-problem
1 REPLY 1
Posted on November 09, 2011 at 17:44

Help! Not sure what's going on. Is this a problem with the chip?

I'd wager the problem is far more mundane, you'd need to look at the code, and what the compiler has generated. Really can't help with the level of detail provided thus far, but a hardware flaw that big would be hard to miss in validation. Check the device errata, create a small stand-alone demonstration of the failure.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..