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

drivers/radio/nrf24l01: Properly handle timeout. #954

Merged
merged 1 commit into from
Apr 10, 2025

Conversation

marcsello
Copy link
Contributor

The timeout condition was not handled before. Upon timeout, this caused the chip to stay active until another send command changed it's state.

Sometimes when it was unable to transmit the data, it got stuck in the tx fifo causing it to fill up over time, which set the TX_FULL flag in the STATUS register.

Since there was no exceptions raised, the user code could not differentiate a successful send or a timeout condition.


Note: timeout condition almost always indicate HW failure or improper control of the chip.

Copy link
Member

@dpgeorge dpgeorge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch!

The timeout condition was not handled before.  Upon timeout, this caused
the chip to stay active until another send command changed it's state.

Sometimes when it was unable to transmit the data, it got stuck in the tx
fifo causing it to fill up over time, which set the TX_FULL flag in the
STATUS register.

Since there was no exceptions raised, the user code could not differentiate
a successful send or a timeout condition.

Signed-off-by: Marcell Pünkösd <[email protected]>
@dpgeorge dpgeorge force-pushed the fix-nrf24l01-handle-timeout branch from 9f143e9 to bd1ab77 Compare April 10, 2025 12:30
@dpgeorge dpgeorge merged commit bd1ab77 into micropython:master Apr 10, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants