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

USB traffic can exceed hardware's ability to deal with it #33

Open
bombasticbob opened this issue Feb 2, 2017 · 5 comments
Open

USB traffic can exceed hardware's ability to deal with it #33

bombasticbob opened this issue Feb 2, 2017 · 5 comments
Assignees

Comments

@bombasticbob
Copy link
Contributor

In particular, an OUT endpoint configured for bulk transfers (such as for CDC/ACM) can receive up to 3 packets that are rapid-fired at maximum bandwidth from the host, before it starts to lose data.

This typically happens when serial port data is sent one byte at a time. This does not appear to affect commercially available USB serial devices.

it may be a problem with the configuration. it may require special intervention to stop it, such as immediately sending a control packet indicating or proper DCD handling (i.e. indicate 'no carrier' or similar when it's not possible to receive more data). Need to check out how to do hardware flow control properly, at any rate, to ensure that I'm not flooded with packet data.

@bombasticbob
Copy link
Contributor Author

NOTE: terminal programs may need to either combine more than 1 char per packet, with a kind of 'nagle' algorithm, or deliberately pace it to match the indicated baud rate on the device.

@bombasticbob
Copy link
Contributor Author

Related to #15, which is now essentially complete

@bombasticbob
Copy link
Contributor Author

ONE possible "fix" might be to use LOW SPEED rather than FAST SPEED for the USB connection

@bombasticbob
Copy link
Contributor Author

See #41

@bombasticbob
Copy link
Contributor Author

bombasticbob commented Nov 24, 2018

A big part of this problem seems to be an "interrupt storm" that happens if the FIFO is not enabled. The manual says that if you write to either the FIFO READ or FIFO WRITE register, the interrupt state is cleared. With the FIFO off, this does not seem to help. So the next step is to implement the FIFO since it seems the peripheral design "wants" that, and is also (apparently) broken when NOT done 'that way'. That was my conclusion from the experiments I did, at any rate.

See #45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant