Skip to content

Commit 3ce19da

Browse files
nordic-krchdleach02
authored andcommitted
drivers: serial: nrfx_uarte: Add runtime PM
Add runtime PM to the driver. When asynchronous or interrupt driven API is used, there are 3 independent paths for enabling the device: RX, TX and TX poll_out. TX poll_out requires special handling because number of poll_out calls does not need to much number of TXSTOPPED interrupts. To handle that special flag is added. For standard RX and TX is simpler. Signed-off-by: Krzysztof Chruściński <[email protected]>
1 parent cfc87da commit 3ce19da

File tree

2 files changed

+254
-214
lines changed

2 files changed

+254
-214
lines changed

drivers/serial/Kconfig.nrfx_uart_instance

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,14 @@ config UART_$(nrfx_uart_num)_NRF_ASYNC_LOW_POWER
6868
depends on HAS_HW_NRF_UARTE$(nrfx_uart_num)
6969
depends on UART_ASYNC_API
7070
depends on UART_NRFX_UARTE_LEGACY_SHIM
71-
default y
71+
default y if !PM_DEVICE
7272
help
7373
When enabled, UARTE is enabled before each TX or RX usage and disabled
7474
when not used. Disabling UARTE while in idle allows to achieve lowest
7575
power consumption. It is only feasible if receiver is not always on.
76+
This option is irrelevant when device power management (PM) is enabled
77+
because then device state is controlled by the PM actions.
78+
7679

7780
config UART_$(nrfx_uart_num)_NRF_HW_ASYNC_TIMER
7881
int "Timer instance"

0 commit comments

Comments
 (0)