Skip to content
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: stm32: Software flow control #36849

Open
JonathanVanWin opened this issue Jul 9, 2021 · 2 comments
Open

drivers: serial: stm32: Software flow control #36849

JonathanVanWin opened this issue Jul 9, 2021 · 2 comments
Assignees
Labels
area: UART Universal Asynchronous Receiver-Transmitter Enhancement Changes/Updates/Additions to existing features platform: STM32 ST Micro STM32

Comments

@JonathanVanWin
Copy link
Contributor

Is your enhancement proposal related to a problem? Please describe.
On the stm32f411 errata sheet, at 2.5.5, there is a hardware flow control problem
described (nRTS signal abnormally driven low after a protocol violation).

Describe the solution you'd like
I would like to add to the USART bindings an optional property for the rts pin.
The reason is that there is no way of knowing from the pinctrl-0 list, which pin is rts, because
the pinmux only contains: port, pin, and alternative function.
Then if hw-flow-control is enabled, only use CTS (if it is the CONFIG_SOC_STM32F411XE), and configure the
rts pin, and in async mode, when changing buffers set the pin high and lower it when finished.
The same when rx_disable occurs, and set it low again when enabled.

Describe alternatives you've considered
We could also instead of adding the rx_pin in the usart bindings, add pinctrl_names, as with the dma.

Additional context
Found out about this issue when testing the current async implementation, using CONFIG_UART_ASYNC_API
and running it on an stm32f411e_disco with hw-flow-control.
Had issues running it with flow control, and then found about the issue in the errata.

@JonathanVanWin JonathanVanWin added the Enhancement Changes/Updates/Additions to existing features label Jul 9, 2021
@shlomow
Copy link
Contributor

shlomow commented Jul 19, 2021

I think that this feature is very useful. Another use case is where the board has an error not having pin with rts alternate function, but it has some gpio. In this case, we have a workaround using the software flow control

@FRASTM FRASTM added area: UART Universal Asynchronous Receiver-Transmitter platform: STM32 ST Micro STM32 labels Jul 21, 2021
@erwango erwango self-assigned this Nov 22, 2021
@zephyrbot
Copy link
Collaborator

Hi @erwango,

This issue, marked as an Enhancement, was opened a while ago and did not get any traction. Please confirm the issue is correctly assigned and re-assign it otherwise.

Please take a moment to review if the issue is still relevant to the project. If it is, please provide feedback and direction on how to move forward. If it is not, has already been addressed, is a duplicate, or is no longer relevant, please close it with a short comment explaining the reason.

@JonathanVanWin you are also encouraged to help moving this issue forward by providing additional information and confirming this request/issue is still relevant to you.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: UART Universal Asynchronous Receiver-Transmitter Enhancement Changes/Updates/Additions to existing features platform: STM32 ST Micro STM32
Projects
None yet
Development

No branches or pull requests

5 participants