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

uart: TX_DONE occurs before transmission is complete. #33866

Closed
zisisadamos opened this issue Mar 30, 2021 · 0 comments
Closed

uart: TX_DONE occurs before transmission is complete. #33866

zisisadamos opened this issue Mar 30, 2021 · 0 comments
Labels
area: UART Universal Asynchronous Receiver-Transmitter bug The issue is a bug, or the PR is fixing a bug platform: STM32 ST Micro STM32

Comments

@zisisadamos
Copy link
Contributor

Describe the bug
TX_DONE event occurs before transmission is complete on STM32 async usart api.
ISSUE
In the attached image RTS pin state is controlled by the TX_DONE event. It is clear that the event is triggered before transmission is complete. This is because TX_DONE is generated when DMA finishes data transfer on transmit register and not when transmit register is empy.

To Reproduce
Steps to reproduce the behavior:

  1. Have a uart peripheral correctly configured in async mode.
  2. Use async TX and monitor TX_DONE event in conjuction with with tx line.
  3. Bug occurs.

Expected behavior
TX_DONE should occur when peripheral tx register is empty.

Impact
Showstopper

Environment (please complete the following information):

@zisisadamos zisisadamos added the bug The issue is a bug, or the PR is fixing a bug label Mar 30, 2021
@carlescufi carlescufi changed the title TX_DONE occurs before transmission is complete. uart: TX_DONE occurs before transmission is complete. Mar 30, 2021
@carlescufi carlescufi added area: UART Universal Asynchronous Receiver-Transmitter platform: STM32 ST Micro STM32 labels Mar 30, 2021
zisisadamos added a commit to zisisadamos/zephyr that referenced this issue Mar 30, 2021
Corrects TX_DONE generation occuring to early
on async api.
Fixes zephyrproject-rtos#33866
Signed-off-by: Zisis Adamos <[email protected]>
@galak galak added the has-pr label Mar 30, 2021
@nashif nashif closed this as completed in 7235b09 Mar 31, 2021
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 bug The issue is a bug, or the PR is fixing a bug platform: STM32 ST Micro STM32
Projects
None yet
Development

No branches or pull requests

3 participants