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

applet.interface.uart: high Baud rates drop data #263

Open
attie opened this issue Jan 19, 2021 · 1 comment
Open

applet.interface.uart: high Baud rates drop data #263

attie opened this issue Jan 19, 2021 · 1 comment
Assignees
Labels
applet Component: applet help-wanted Meta: help wanted

Comments

@attie
Copy link
Member

attie commented Jan 19, 2021

It seems that using ~1.5Mbaud, with high Rx data rates can cause the applet FIFOs to overflow, and silently drop data.

1.5Mbaud is worst-case of ~150KB/s... this overflow is likely due to the relatively inefficient USB utilization that is incurred with the default auto_flush=True.

Suggestions:

  1. Set auto_flush=False, and implement a timer to flush buffers after a number of idle bit/word-times
  2. Increase FPGA-side FIFO size, past the default of depth=512
  3. Add a register to indicate overflow / dropped frames

I think that this should be a non-issue for Tx data, as the buffers will back up, eventually into Python.


This was discovered by @marcan while working on Asahi Linux.

@attie attie self-assigned this Jan 19, 2021
@attie attie added the applet Component: applet label Jan 19, 2021
@whitequark whitequark added the help-wanted Meta: help wanted label Jul 24, 2023
@whitequark
Copy link
Member

We should probably implement something like Nagle for UART.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
applet Component: applet help-wanted Meta: help wanted
Projects
None yet
Development

No branches or pull requests

2 participants