-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
drivers: serial: nrfx_uarte: UART shim based on nrfx_uarte driver #65155
Changes from all commits
efb1b3e
5d657ab
5596455
d38e688
a64a5f0
c64f089
7972e4f
cfa4d58
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
config UART_$(nrfx_uart_num)_INTERRUPT_DRIVEN | ||
bool "Interrupt support on port $(nrfx_uart_num)" | ||
depends on UART_INTERRUPT_DRIVEN | ||
select UART_ASYNC_TO_INT_DRIVEN_API if !UART_NRFX_UARTE_LEGACY_SHIM | ||
default y | ||
help | ||
This option enables UART interrupt support on port $(nrfx_uart_num). | ||
|
@@ -27,14 +28,18 @@ config UART_$(nrfx_uart_num)_ENHANCED_POLL_OUT | |
When enabled, polling out does not trigger interrupt which stops TX. | ||
Feature uses a PPI channel. | ||
|
||
config NRFX_UARTE$(nrfx_uart_num) | ||
def_bool y if HAS_HW_NRF_UARTE$(nrfx_uart_num) && !UART_NRFX_UARTE_LEGACY_SHIM | ||
|
||
config UART_$(nrfx_uart_num)_NRF_PARITY_BIT | ||
bool "Parity bit" | ||
help | ||
Enable parity bit. | ||
|
||
config UART_$(nrfx_uart_num)_NRF_TX_BUFFER_SIZE | ||
int "Size of RAM buffer" | ||
depends on UART_INTERRUPT_DRIVEN | ||
depends on HAS_HW_NRF_UARTE$(nrfx_uart_num) | ||
depends on UART_NRFX_UARTE_LEGACY_SHIM | ||
range 1 65535 | ||
default 32 | ||
help | ||
|
@@ -46,6 +51,7 @@ config UART_$(nrfx_uart_num)_NRF_HW_ASYNC | |
bool "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 | ||
select NRFX_PPI if HAS_HW_NRF_PPI | ||
select NRFX_DPPI if HAS_HW_NRF_DPPIC | ||
help | ||
|
@@ -58,6 +64,7 @@ config UART_$(nrfx_uart_num)_NRF_ASYNC_LOW_POWER | |
bool "Low power mode" | ||
depends on HAS_HW_NRF_UARTE$(nrfx_uart_num) | ||
depends on UART_ASYNC_API | ||
depends on UART_NRFX_UARTE_LEGACY_SHIM | ||
help | ||
When enabled, UARTE is enabled before each TX or RX usage and disabled | ||
when not used. Disabling UARTE while in idle allows to achieve lowest | ||
|
@@ -67,6 +74,42 @@ config UART_$(nrfx_uart_num)_NRF_HW_ASYNC_TIMER | |
int "Timer instance" | ||
depends on UART_$(nrfx_uart_num)_NRF_HW_ASYNC | ||
|
||
config UART_$(nrfx_uart_num)_TX_CACHE_SIZE | ||
int "TX cache buffer size" | ||
depends on !UART_NRFX_UARTE_LEGACY_SHIM | ||
default 8 | ||
help | ||
For UARTE, TX cache buffer is used when provided TX buffer is not located | ||
in memory which can be used by the EasyDMA. | ||
|
||
config UART_$(nrfx_uart_num)_RX_CACHE_SIZE | ||
int "RX cache buffer size" | ||
depends on !UART_NRFX_UARTE_LEGACY_SHIM | ||
default 32 if $(dt_nodelabel_has_compat,ram3x,$(DT_COMPAT_MMIO_SRAM)) | ||
default 5 | ||
range 5 255 | ||
help | ||
For UARTE, RX cache buffer is used when provided RX buffer is not located | ||
in memory which can be used by the EasyDMA. It is also used to store | ||
flushed data. | ||
|
||
config UART_$(nrfx_uart_num)_A2I_RX_SIZE | ||
depends on !UART_NRFX_UARTE_LEGACY_SHIM | ||
int "Asynchronous to interrupt driven adaptation layer RX buffer size" | ||
default 64 if UART_$(nrfx_uart_num)_INTERRUPT_DRIVEN | ||
default 0 | ||
help | ||
Amount of space dedicated for RX. It is divided into chunks with some | ||
amount of that space used for control data. | ||
|
||
config UART_$(nrfx_uart_num)_A2I_RX_BUF_COUNT | ||
Comment on lines
+77
to
+105
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not a fan is instance-based options, these do not scale well and perpetuate the problem nrfx-based driver have: hardcoded relationship with hw instance numbers. Isn't there a better option? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ping |
||
depends on !UART_NRFX_UARTE_LEGACY_SHIM | ||
int "Asynchronous to interrupt driven adaptation layer RX buffer count" | ||
default 8 if UART_$(nrfx_uart_num)_INTERRUPT_DRIVEN | ||
default 0 | ||
help | ||
Number of chunks into RX space is divided. | ||
|
||
config UART_$(nrfx_uart_num)_GPIO_MANAGEMENT | ||
bool "GPIO management on port $(nrfx_uart_num)" | ||
depends on PM_DEVICE | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this expected to improve/be fixed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, eventually we want to have one shim only. But harder to say exact when.