-
Notifications
You must be signed in to change notification settings - Fork 55
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
piolib: please add API to access the txstall register & other FDEBUG registers #114
Comments
Hi Jeff, my head is temporarily out of PIO space, but I'll consider this and #115 when it returns. |
TXSTALL appears along with other flags (RXSTALL. TXOVER and RXUNDER) in the FDEBUG register. There is currently no accessor function, so I feel free to come up with something new - ideally one that automatically selects the correct flags for the current/specified SM. How do you feel about the following:
|
Here's what we do in CircuitPython on rp2 around detecting completion of a transfer:
the first bit would be We don't actually seem to use any other FDEBUG bits than TXSTALL and RXSTALL fwiw |
I'd already decided to include a |
Sometimes it's necessary to wait for a txstall, not just tx fifo drain, before performing some other action. For instance, to implement transmit-only SPI with a GPIO CS pin, you need to wait for the last bit of SPI data to actually be transmitted before deasserting CS.
The text was updated successfully, but these errors were encountered: