Skip to content

Conversation

@nordic-krch
Copy link
Contributor

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.

@nordic-krch nordic-krch requested a review from anangl as a code owner November 6, 2024 07:08
@zephyrbot zephyrbot added area: UART Universal Asynchronous Receiver-Transmitter size: XS A PR changing only a single line of code platform: nRF Nordic nRFx labels Nov 6, 2024
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]>
@nordic-krch nordic-krch force-pushed the nrfx_uarte_non_low_power_fix branch from f761f8a to c95fb5b Compare November 6, 2024 07:12
@nordic-krch
Copy link
Contributor Author

It matches conditions on which flush_cnt is used to prepend flushed data to the buffer:

if (IS_ENABLED(CONFIG_PM_DEVICE_RUNTIME) || LOW_POWER_ENABLED(cfg)) {

@nordic-krch nordic-krch added the bug The issue is a bug, or the PR is fixing a bug label Nov 7, 2024
@nashif nashif merged commit ed5ce47 into zephyrproject-rtos:main Nov 16, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: UART Universal Asynchronous Receiver-Transmitter bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx size: XS A PR changing only a single line of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants