Skip to content
Commit 3104ad0e authored by Peter McGaughey's avatar Peter McGaughey Committed by Anas Nashif
Browse files

drivers: serial: uart_sam0: fix uart_sam0_irq_update TXC reset



drivers: serial: uart_sam0: fix uart_sam0_irq_update TXC reset bug

uart_sam0_irq_update function resets flags that will cause int. re-entry
existing implementation also clears the TXC flag if it is set
this breaks transmit complete detection

Per the SAMD5x/E5x Datasheet Sect. 34.8.6, writing '1' to the TXC will
clear the flag and disable TX complete interrupts, this should be
preserved through the irq_update for use in the tx_complete check function

The proper fix will cache the TXC value before conditionally clearing the
flag based on that cached value. If you do not condition this on the
cached value a race condition will periodically occur where
the TXC is cleared but never cached.

Fixes zephyrproject-rtos#55386

Signed-off-by: default avatarPeter McGaughey <peter.mcgaughey@daikincomfort.com>
parent 2019c044
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment