Skip to content

Commit b27ed6f

Browse files
nordic-krchrlubos
authored andcommitted
[nrf fromlist] 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. Upstream PR #: 80968 Signed-off-by: Krzysztof Chruściński <[email protected]>
1 parent d9bec06 commit b27ed6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/serial/uart_nrfx_uarte.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,7 @@ static void rxto_isr(const struct device *dev)
15161516
async_rx->total_user_byte_cnt += rx_flush(dev);
15171517
}
15181518
#endif
1519-
} else {
1519+
} else if (IS_ENABLED(CONFIG_PM_DEVICE_RUNTIME) || LOW_POWER_ENABLED(config)) {
15201520
async_rx->flush_cnt = rx_flush(dev);
15211521
}
15221522

0 commit comments

Comments
 (0)