Both functions passed a flag constant (USART_FLAG_TXE) to USART_GetITStatus() and span while TXE was set - but TXE being set means the data register is already empty, so the loop exited immediately with data still queued in the software FIFO and shifting out of the USART. flush therefore never waited at all. Wait for the software TX FIFO to drain and then for the TC flag, which indicates the shift register has actually emptied.pull/169/head
parent
3c1d39312e
commit
272d563010
Loading…
Reference in new issue