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

handle clearing both RXIC and RTIC interrupts #6240

Merged

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Apr 5, 2022

Fixes #6237.

Between pico-sdk 1.2.0 and 1.3.0, the RP2040 RT UART timeout interrupt was enabled as part of uart_set_irq_enables(). See raspberrypi/pico-sdk#500 and raspberrypi/pico-sdk#504. Our code did not know this interrupt was now enabled, and did not clear it in the interrupt service routine. Random noise on the RX line could cause this interrupt to be triggered, and once triggered, it was not cleared if the data was not read, and I believe it ended up in a tight constantly firing interrupt loop.

Added code to clear the interrupt. Tested with two RP2040's, one sending data to the other.

@ATMakersBill This sounds like it may be the cause the odd behavior you saw on your USB host board. This means causes other than noise could also trigger the original bug.

@dhalbert dhalbert requested a review from jepler April 5, 2022 03:57
@dhalbert dhalbert added this to the 7.2.x milestone Apr 5, 2022
Copy link
Member

@jepler jepler left a comment

Choose a reason for hiding this comment

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

Thanks!

@jepler jepler merged commit 8cd09b1 into adafruit:7.2.x Apr 5, 2022
@dhalbert dhalbert deleted the 7.2.x-rp2040-clear-uart-rtic-interrupt branch April 5, 2022 13:43
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