-
Notifications
You must be signed in to change notification settings - Fork 10
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
Use RX FIFO threshold to batch copy bytes #24
Comments
Alternatively, we could rely on rxfifo_full_thrhd to raise an interrupt only when some moderately large number of bytes (e.g. 100 bytes) are in the FIFO? That would still gave enough time for the interrupt handler to copy those bytes out of the FIFO before an overflow happens. |
Yeah, I think that would work better actually, because our slip packets are quite small. |
@igrr How would this work when the packet exchange ends and there are say 90 bytes left in the FIFO? |
The simplest option is probably to enable the RX timeout interrupt. It will fire if no byte has been received for a given number of cycles. |
Currently, the uart is being interrupted on every byte this is not optimal for performance, and especially at higher bauds we make miss single bytes. We should use the AT-CMD feature to detect end the end of slip packets and fetch a packet at a time in the interrupt.
The text was updated successfully, but these errors were encountered: