Skip to content

Commit a36d97e

Browse files
committed
[nrf fromlist] drivers: serial: nrfx_uarte: Fix low power mode for interrupt driven API
Low power mode for non-asynchronous API case is only available when RX is not used (RX pin is not defined). In that case TX starting function was using uarte_enable_locked() which tracks if UARTE is used by TX or RX and TXSTOPPED interrupt was disabling UARTE unconditionally. Because of that following attempt to TX start was assuming that UARTE is already enabled when it was disabled. Fixing it by using uarte_disable_locked function in TXSTOPPED handling. Upstream PR #: 81631 Signed-off-by: Krzysztof Chruściński <[email protected]>
1 parent c0cbcfd commit a36d97e

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
@@ -398,7 +398,7 @@ static void uarte_nrfx_isr_int(const void *arg)
398398
data->flags &= ~UARTE_FLAG_POLL_OUT;
399399
pm_device_runtime_put(dev);
400400
} else {
401-
nrf_uarte_disable(uarte);
401+
uarte_disable_locked(dev, UARTE_FLAG_LOW_POWER_TX);
402402
}
403403

404404
#ifdef UARTE_INTERRUPT_DRIVEN

0 commit comments

Comments
 (0)