Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
bfwolf Senior Member Joined: 03/01/2025 Location: GermanyPosts: 290
Posted: 06:59pm 30 Nov 2026
Copy link to clipboard
Print this post
Probably polling the BUSY bit (bit3) in the UARTFR (offset 0x18) would help:
BUSY: UART busy. If this bit is set to 1, the UART is busy transmitting data. This bit remains set until the complete byte, including all the stop bits, has been sent from the shift register. This bit is set as soon as the transmit FIFO becomes non-empty, regardless of whether the UART is enabled or not.
The polling should be done after DMA-end or whatever indicates "TX FIFO empty". Unfortunately, there is no corresponding IRQ-enable bit — otherwise, one could assign an IRQ handler to it.