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 NS16550 Underflow Issue During Clearing Port #34234

Closed
lipengit opened this issue Apr 13, 2021 · 2 comments · Fixed by #34235
Closed

UART NS16550 Underflow Issue During Clearing Port #34234

lipengit opened this issue Apr 13, 2021 · 2 comments · Fixed by #34235
Assignees
Labels
area: UART Universal Asynchronous Receiver-Transmitter bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@lipengit
Copy link
Contributor

lipengit commented Apr 13, 2021

Describe the bug
During UART initialization, the CPU reads the RDR register to clear the UART port, the Synopsys UART IP reports a buffer under flow error.

To Reproduce
We have this issue on Synopsys UART IP. Not sure if this issue can be reproduced on other UART IPs that are NS16550 compatible.

Expected behavior
During the UART initialization, when the CPU reads the RDR register to clear the port, the UART should NOT reports a buffer under flow error.

Impact
We have fixed this issue with minor changes to "uart_ns16550.c"
Before clear the port, we just need to set DLAB to 1. After clear the port, we reset DLAB to 0.

Logs and console output
UART_0 Error[Buffer Underflow] RBR doesn't contains the valid data.

Environment (please complete the following information):

  • OS: Windows
  • Toolchain: Xtensa XCC
  • Commit SHA or Version used: v2.5.0, fe7c2ef

Additional context
We have fixed this issue. Please help merge the above patch to the main branch. Thanks.

@lipengit lipengit added the bug The issue is a bug, or the PR is fixing a bug label Apr 13, 2021
@galak galak added area: UART Universal Asynchronous Receiver-Transmitter has-pr labels Apr 13, 2021
@galak
Copy link
Collaborator

galak commented Apr 13, 2021

Fix in #34235

@jenmwms
Copy link
Collaborator

jenmwms commented Apr 14, 2021

Can the title be slightly modified to describe the issue? Maybe add 'underflow issue' or 'does not fully clear the port'?

@lipengit lipengit changed the title UART NS16550 Driver Issue UART NS16550 Underflow Issue During Clearing Port Apr 14, 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 priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants