You are cllaring the error bits in the wrong way: the bits in uart->rsr are write-1-to-clear, so instead of your hw_clear_bits() - which won't have any effect - you actually need:
(or something similar like reading it into a variable for your if statement and writing that value back to RSR if nonzero).
Code:
uart_get_hw(uart1)->rsr = uart_get_hw(uart1)->rsr;
Statistics: Posted by arg001 — Fri Dec 13, 2024 12:17 pm