Commit 384e940c authored by Krzysztof Chruściński's avatar Krzysztof Chruściński Committed by Benjamin Cabé
Browse files

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: default avatarKrzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
parent 30c45057
Loading
Loading
Loading
Loading
+1 −1
Changes for drivers/serial/Kconfig.nrfx: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ config UART_NRFX_UARTE_ENHANCED_RX
	bool "Enhanced RX handling"
	depends on UART_ASYNC_API
	depends on UART_NRFX_UARTE_LEGACY_SHIM
	default y if !(UART_0_NRF_HW_ASYNC || UART_1_NRF_HW_ASYNC || UART_2_NRF_HW_ASYNC)
	default y
	help
	  Enable RX handling mode which is switching buffers on timeout. This is an
	  enhancement compared to other two modes (default and hardware assisted).
+6 −1
Changes for drivers/serial/Kconfig.nrfx_uart_instance: 6 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -49,18 +49,23 @@ config UART_$(nrfx_uart_num)_NRF_TX_BUFFER_SIZE
	  particular SoC.

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

	  This options is deprecated. Use UART_NRFX_UARTE_ENHANCED_RX which supports
	  reliable byte counting without additional HW resources (TIMER and (D)PPI).

config UART_$(nrfx_uart_num)_NRF_ASYNC_LOW_POWER
	bool "Low power mode"
	depends on HAS_HW_NRF_UARTE$(nrfx_uart_num)
+0 −3
Changes for samples/net/cellular_modem/boards/nrf9160dk_nrf52840.conf: 0 added lines, 3 removed lines.
Original line number Diff line number Diff line
CONFIG_UART_ASYNC_API=y
CONFIG_UART_1_ASYNC=y
CONFIG_UART_1_INTERRUPT_DRIVEN=n
# Enable HW RX byte counting. This especially matters at higher baud rates.
CONFIG_UART_1_NRF_HW_ASYNC=y
CONFIG_UART_1_NRF_HW_ASYNC_TIMER=1

# Align with the Serial LTE Modem (SLM) application.
CONFIG_MODEM_CELLULAR_CMUX_MAX_FRAME_SIZE=1500
+0 −3
Changes for samples/net/cellular_modem/boards/nrf9160dk_nrf9160_ns.conf: 0 added lines, 3 removed lines.
Original line number Diff line number Diff line
CONFIG_UART_ASYNC_API=y
CONFIG_UART_1_ASYNC=y
CONFIG_UART_1_INTERRUPT_DRIVEN=n
# Enable HW RX byte counting. This especially matters at higher baud rates.
CONFIG_UART_1_NRF_HW_ASYNC=y
CONFIG_UART_1_NRF_HW_ASYNC_TIMER=1

# Align with the Serial LTE Modem (SLM) application.
CONFIG_MODEM_CELLULAR_CMUX_MAX_FRAME_SIZE=1500
+0 −2
Changes for tests/drivers/uart/uart_async_api/boards/nrf5340bsim_nrf5340_cpuapp.conf: 0 added lines, 2 removed lines.
Original line number Diff line number Diff line
CONFIG_UART_1_NRF_HW_ASYNC_TIMER=1
CONFIG_UART_NRFX_UARTE_ENHANCED_RX=y
Loading