2021-01-12 12:30 AM
Hello,
what is the value of USART->DR (RDR) is read twice after receiving a byte? E.g.
Does the DR hold the last received value? I could not find answer in the STM32F205 user manual (UM) what is the expected value. The UM does not explicitly forbids to read it during RXNE = 0.
Martin
PS
Of course, I could test it by myself but such test gives me answer only during one particular use case. In case of random value, I can hit the e.g. 0 and make wrong assumption that the DR is cleared.
2021-01-12 03:39 AM
You don't need to know the answer, simply don't read DR if RXNE is not set.
JW