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

serial: uart_nrfx_uarte: poll & async TX infinite hang #25448

Closed
JordanYates opened this issue May 19, 2020 · 1 comment
Closed

serial: uart_nrfx_uarte: poll & async TX infinite hang #25448

JordanYates opened this issue May 19, 2020 · 1 comment
Labels
bug The issue is a bug, or the PR is fixing a bug

Comments

@JordanYates
Copy link
Collaborator

JordanYates commented May 19, 2020

Describe the bug
When using uarte_nrfx_poll_out and uarte_nrfx_tx from different threads in the same application,
the poll_out thread can block forever, and all calls to uarte_nrfx_tx will result in failure.

This is a continuation of issue #22264

To Reproduce

  1. Setup a nrf52840dk to use the UARTE driver.
  2. Add 2 threads to any sample, one of which calls printk in a loop, the other which calls uart_tx
  3. Have the poll thread preempt the uart_tx thread
  4. Poll out will never return, resulting in infinite hang.

I have pushed a commit based on Zephyr 2.3rc1 that demonstrates this issue on the blinky sample application.
https://github.com/JordanYates/zephyr/commit/87d296baca519294d28a8394f40022a42ef82991

Expected behavior

Both the poll_out and uart_tx threads should forever print out their respective messages.
The provided reproduction will instead print out 3 "I poll" messages before stopping forever.

Impact
Major annoyance

Environment (please complete the following information):

  • Zephyr 2.3rc1
@JordanYates JordanYates added the bug The issue is a bug, or the PR is fixing a bug label May 19, 2020
@JordanYates
Copy link
Collaborator Author

And of course I then realize its a thread priority issue, nothing to do with the driver itself.
Apologies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

No branches or pull requests

1 participant