Skip to content

Commit ed5ce47

Browse files
nordic-krchnashif
authored andcommitted
drivers: serial: nrfx_uarte: Fix RX path without low power modes
RX FIFO flushing on RXTO event should only be performed when UARTE peripheral might be disable during inactivity and that happens when low power modes is enabled or when device runtime PM is used. Flushing was incrementing flush_cnt which was not used (flushed data is not copied to the next buffer) which was causing data loss and invalid RX data length reporting. Signed-off-by: Krzysztof Chruściński <[email protected]>
1 parent effe4bb commit ed5ce47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/serial/uart_nrfx_uarte.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1521,7 +1521,7 @@ static void rxto_isr(const struct device *dev)
15211521
async_rx->total_user_byte_cnt += rx_flush(dev);
15221522
}
15231523
#endif
1524-
} else {
1524+
} else if (IS_ENABLED(CONFIG_PM_DEVICE_RUNTIME) || LOW_POWER_ENABLED(config)) {
15251525
async_rx->flush_cnt = rx_flush(dev);
15261526
}
15271527

0 commit comments

Comments
 (0)