Commit 6b1413d
committed
Avoid losing input bytes in the UART on STM32F4xx.
The compiler expands an assignment to part of the DR register
to a read-modify-write sequence. However, reading DR has
the side-effect of clearing the SR.RXNE bit, so sending
a byte could result in the loss of input bytes.1 parent 983f3b1 commit 6b1413d
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| |||
0 commit comments