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

software/kernel/liteuart.c: added a workqueue to avoid blocking timer callback #146

Merged

Conversation

trabucayre
Copy link
Collaborator

With a continuous UART RX stream at high speed, timer callback took a too long time before finishing, or don't finish.
As the result some interrupts are blocked and the kernel hang with the need to force stop/start the computer.

This PR adds a workqueue to delegate RX FIFO read out of the timer callback.

To avoid to adds to long latency, this workqueue is only used after a 256 read sequence. This keep the default behavior in a normal uses.

Note to myself/TODO/FIXME: When the read is transfered to the workqueue, timer callback must avoid to call mod_timer and let the workqueue to do this task at the end of execution.

@enjoy-digital
Copy link
Owner

Thanks @trabucayre, this is merged.

@enjoy-digital enjoy-digital merged commit 5eac3b3 into enjoy-digital:master Mar 10, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants