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

Spurious UART interrupts #18

Closed
michaelengel opened this issue Aug 2, 2023 · 2 comments
Closed

Spurious UART interrupts #18

michaelengel opened this issue Aug 2, 2023 · 2 comments

Comments

@michaelengel
Copy link

The JH7110 uses a DesignWare UART component which has some "interesting" extra features. The spurious interrupts are probably caused by a busy interrupt generated by the UART (which is caused by writing the LCR when the chip is busy). If this interrupt is not cleared, you'll end up in an interrupt storm.

See e.g. the [Linux DesignWare UART driver] for a workaround (https://elixir.bootlin.com/linux/latest/source/drivers/tty/serial/8250/8250_dw.c).

@lupyuen
Copy link
Owner

lupyuen commented Aug 2, 2023

That's very helpful, thanks for the tip! :-)

@lupyuen
Copy link
Owner

lupyuen commented Aug 2, 2023

Update: We fixed the Spurious UART Interrupts by waiting for UART to be not busy before setting the Line Control Register:

https://github.com/lupyuen2/wip-pinephone-nuttx/pull/36/files#diff-f208234edbfb636de240a0fef1c85f9cecb37876d5bc91ffb759f70a1e96b1d1

Thank you so much! :-)

@lupyuen lupyuen closed this as completed Aug 5, 2023
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

No branches or pull requests

2 participants