Skip to content

drivers: serial: nrfx_uarte: Add extension that uses TIMER byte counting on nrf54x devices #92767

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions drivers/serial/Kconfig.nrfx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,32 @@ config UART_ASYNC_TX_CACHE_SIZE
in RAM, because EasyDMA in UARTE peripherals can only transfer data
from RAM.

config UARTE_NRFX_UARTE_COUNT_BYTES_WITH_TIMER
bool "Use TIMER to count RX bytes"
depends on UART_ASYNC_API
depends on UART_NRFX_UARTE_LEGACY_SHIM
depends on !ARCH_POSIX # Mode not supported on BSIM target
select NRFX_GPPI

config UART_NRFX_UARTE_BOUNCE_BUF_LEN
int "RX bounce buffer size"
depends on UARTE_NRFX_UARTE_COUNT_BYTES_WITH_TIMER
default 256
range 64 1024
help
Buffer is used when workaround with bounce buffers is applied

config UART_NRFX_UARTE_BOUNCE_BUF_SWAP_LATENCY
int "RX bounce buffer swap latency (in microseconds)"
depends on UARTE_NRFX_UARTE_COUNT_BYTES_WITH_TIMER
default 300
help
Option decides how long before current bounce buffer is filled driver
attempts to swap the buffer. It must be long enough to ensure that
space following the buffer is not overwritten. Too high value results
in more frequent buffer swaps so it impacts performance. Setting should
take into account potential interrupt handling latency.

config UART_NRFX_UARTE_DIRECT_ISR
bool "Use direct ISR"

Expand Down
7 changes: 7 additions & 0 deletions drivers/serial/Kconfig.nrfx_uart_instance
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ config UART_$(nrfx_uart_num)_ASYNC
help
This option enables UART Asynchronous API support on port $(nrfx_uart_num).

config UART_$(nrfx_uart_num)_COUNT_BYTES_WITH_TIMER
bool
depends on $(dt_nodelabel_has_prop,uart$(nrfx_uart_num),timer)
depends on HAS_HW_NRF_UARTE$(nrfx_uart_num)
default y
imply UARTE_NRFX_UARTE_COUNT_BYTES_WITH_TIMER

config UART_$(nrfx_uart_num)_ENHANCED_POLL_OUT
bool "Efficient poll out on port $(nrfx_uart_num)"
depends on !$(dt_nodelabel_bool_prop,uart$(nrfx_uart_num),endtx-stoptx-supported)
Expand Down
Loading
Loading