Skip to content

Commit 384e940

Browse files
nordic-krchkartben
authored andcommittedDec 6, 2024·
drivers: serial: nrfx_uarte: Deprecate CONFIG_UART_x_NRF_HW_ASYNC
Deprecate mode which is using TIMER+(D)PPI for reliable byte counting. Recently a new approach is added (CONFIG_UART_NRFX_UARTE_ENHANCED_RX) which supports reliable byte counting without additional HW resource. This mode is planned to be the only supported RX path mode. Enhanced RX has slightly different behavior. There are no partial RX packets (events with non-zero offset). There is UART_RX_BUF_RELEASED after each UART_RX_RDY event. Signed-off-by: Krzysztof Chruściński <[email protected]>
·
v4.2.0v4.1.0-rc1
1 parent 30c4505 commit 384e940

File tree

10 files changed

+7
-25
lines changed

10 files changed

+7
-25
lines changed
 

‎drivers/serial/Kconfig.nrfx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ config UART_NRFX_UARTE_ENHANCED_RX
3737
bool "Enhanced RX handling"
3838
depends on UART_ASYNC_API
3939
depends on UART_NRFX_UARTE_LEGACY_SHIM
40-
default y if !(UART_0_NRF_HW_ASYNC || UART_1_NRF_HW_ASYNC || UART_2_NRF_HW_ASYNC)
40+
default y
4141
help
4242
Enable RX handling mode which is switching buffers on timeout. This is an
4343
enhancement compared to other two modes (default and hardware assisted).

‎drivers/serial/Kconfig.nrfx_uart_instance

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,23 @@ config UART_$(nrfx_uart_num)_NRF_TX_BUFFER_SIZE
4949
particular SoC.
5050

5151
config UART_$(nrfx_uart_num)_NRF_HW_ASYNC
52-
bool "Use hardware RX byte counting"
52+
bool "[DEPRECATED] Use hardware RX byte counting"
5353
depends on HAS_HW_NRF_UARTE$(nrfx_uart_num)
5454
depends on UART_ASYNC_API
5555
depends on UART_NRFX_UARTE_LEGACY_SHIM
56+
depends on !UART_NRFX_UARTE_ENHANCED_RX
5657
depends on HAS_HW_NRF_PPI || HAS_HW_NRF_DPPIC
5758
select NRFX_GPPI
59+
select DEPRECATED
5860
help
5961
If default driver uses interrupts to count incoming bytes, it is possible
6062
that with higher speeds and/or high cpu load some data can be lost.
6163
It is recommended to use hardware byte counting in such scenarios.
6264
Hardware RX byte counting requires timer instance and one PPI channel.
6365

66+
This options is deprecated. Use UART_NRFX_UARTE_ENHANCED_RX which supports
67+
reliable byte counting without additional HW resources (TIMER and (D)PPI).
68+
6469
config UART_$(nrfx_uart_num)_NRF_ASYNC_LOW_POWER
6570
bool "Low power mode"
6671
depends on HAS_HW_NRF_UARTE$(nrfx_uart_num)

‎samples/net/cellular_modem/boards/nrf9160dk_nrf52840.conf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
CONFIG_UART_ASYNC_API=y
22
CONFIG_UART_1_ASYNC=y
33
CONFIG_UART_1_INTERRUPT_DRIVEN=n
4-
# Enable HW RX byte counting. This especially matters at higher baud rates.
5-
CONFIG_UART_1_NRF_HW_ASYNC=y
6-
CONFIG_UART_1_NRF_HW_ASYNC_TIMER=1
74

85
# Align with the Serial LTE Modem (SLM) application.
96
CONFIG_MODEM_CELLULAR_CMUX_MAX_FRAME_SIZE=1500

‎samples/net/cellular_modem/boards/nrf9160dk_nrf9160_ns.conf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
CONFIG_UART_ASYNC_API=y
22
CONFIG_UART_1_ASYNC=y
33
CONFIG_UART_1_INTERRUPT_DRIVEN=n
4-
# Enable HW RX byte counting. This especially matters at higher baud rates.
5-
CONFIG_UART_1_NRF_HW_ASYNC=y
6-
CONFIG_UART_1_NRF_HW_ASYNC_TIMER=1
74

85
# Align with the Serial LTE Modem (SLM) application.
96
CONFIG_MODEM_CELLULAR_CMUX_MAX_FRAME_SIZE=1500

‎tests/drivers/uart/uart_async_api/boards/nrf5340bsim_nrf5340_cpuapp.conf

Lines changed: 0 additions & 2 deletions
This file was deleted.

‎tests/drivers/uart/uart_async_api/boards/nrf5340dk_nrf5340_cpuapp.conf

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
CONFIG_ARM_MPU=n
2-
CONFIG_UART_1_NRF_HW_ASYNC=y
3-
CONFIG_UART_1_NRF_HW_ASYNC_TIMER=2

‎tests/drivers/uart/uart_errors/boards/nrf5340dk_nrf5340_cpuapp.conf

Lines changed: 0 additions & 2 deletions
This file was deleted.

‎tests/drivers/uart/uart_mix_fifo_poll/testcase.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,6 @@ tests:
105105
- CONFIG_UART_0_INTERRUPT_DRIVEN=n
106106
- CONFIG_UART_0_ASYNC=y
107107
- CONFIG_UART_0_ENHANCED_POLL_OUT=n
108-
- CONFIG_UART_0_NRF_HW_ASYNC=y
109-
- CONFIG_UART_0_NRF_HW_ASYNC_TIMER=2
110-
- CONFIG_NRFX_TIMER2=y
111108
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
112109
platform_exclude:
113110
- nrf54l15dk/nrf54l15/cpuapp

‎tests/drivers/uart/uart_pm/testcase.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ tests:
6969
- CONFIG_UART_INTERRUPT_DRIVEN=n
7070
- CONFIG_UART_ASYNC_API=y
7171
- CONFIG_UART_0_ASYNC=y
72-
- CONFIG_UART_0_NRF_HW_ASYNC=y
73-
- CONFIG_UART_0_NRF_HW_ASYNC_TIMER=2
74-
- CONFIG_NRFX_TIMER2=y
7572
- CONFIG_UART_0_ENHANCED_POLL_OUT=n
7673
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
7774

@@ -80,9 +77,6 @@ tests:
8077
- CONFIG_UART_INTERRUPT_DRIVEN=n
8178
- CONFIG_UART_ASYNC_API=y
8279
- CONFIG_UART_0_ASYNC=y
83-
- CONFIG_UART_0_NRF_HW_ASYNC=y
84-
- CONFIG_UART_0_NRF_HW_ASYNC_TIMER=2
85-
- CONFIG_NRFX_TIMER2=y
8680
- CONFIG_UART_0_ENHANCED_POLL_OUT=y
8781
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
8882
platform_exclude:

0 commit comments

Comments
 (0)
Please sign in to comment.