Re: Review of concept of changing UART flow control from Kconfig to DTS config
Bolivar, Marti
Hi (and +Krzysztof in Cc),
"lairdjm via lists.zephyrproject.org" <jamie.mccrae=lairdconnect.com@...> writes: Hi,To be clear, this PR is limited to nRF SoCs only, it is not a project-wide change. I find this to be a bit of a step backwards for applicationI'm having a bit of trouble understanding what you mean here. The boolean hw-flow-control property is still available for enabling hardware flow control for both UART and UARTE: https://docs.zephyrproject.org/latest/reference/devicetree/bindings/serial/nordic%2Cnrf-uarte.html#dtbinding-nordic-nrf-uarte https://docs.zephyrproject.org/latest/reference/devicetree/bindings/serial/nordic%2Cnrf-uart.html#dtbinding-nordic-nrf-uart Looking at the code, if hw-flow-control is disabled in DTS (the default), then in both drivers cfg->flow_ctrl is false. The HAL configuration structure ends up with flow control disabled in that case: https://github.com/zephyrproject-rtos/zephyr/blob/5f5fb7d7925be3b40b4a963b11fb8b4cfedf03a1/drivers/serial/uart_nrfx_uart.c#L346 https://github.com/zephyrproject-rtos/zephyr/blob/5f5fb7d7925be3b40b4a963b11fb8b4cfedf03a1/drivers/serial/uart_nrfx_uarte.c#L397 So flow control at a SoC level seems to be turned off by default. It's true that many boards in PR #25999 do enable it by default, e.g. nRF52840-DK: https://github.com/zephyrproject-rtos/zephyr/pull/25999/files#diff-f496b12068cf78fdbb22c1b8a4eaeb66010db95b4e80db7377a340ae30a83519R7 But it seems like at a board maintainer level, you can leave the SoC default as-is to make flow control "opt in" as requested. It looks like flow control is off by default and it's opt-in; what did I miss? Thanks! Martà Thanks, |
|