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

Clear out PIOs and State Machines on RP2040 soft reset #4265

Merged
merged 6 commits into from
Mar 3, 2021
Merged

Clear out PIOs and State Machines on RP2040 soft reset #4265

merged 6 commits into from
Mar 3, 2021

Conversation

DavePutz
Copy link
Collaborator

Code to make sure PIOs and state machines are cleared out on a soft reset.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

@DavePutz
Copy link
Collaborator Author

DavePutz commented Feb 26, 2021 via email

@tannewt
Copy link
Member

tannewt commented Feb 26, 2021

Ok, I totally believe that. It seems to me that reset_rp2pio_statemachine should turn off interrupts as well instead of having a separate way to reset things.

@dhalbert dhalbert requested a review from tannewt March 1, 2021 22:29
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Thanks Dave! One more request.

@@ -179,4 +183,7 @@ void reset_board_busses(void) {
#if BOARD_UART
MP_STATE_VM(shared_uart_bus) = NULL;
#endif
#if CIRCUITPY_RP2PIO
reset_rp2pio_statemachine();
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need this anymore because port_reset should call reset_rp2pio_statemachine. rp2pio is meant to be port-specific so it shouldn't influence any code outside of ports/raspberrypi

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed it and still tested OK. Thanks!

@dhalbert dhalbert requested a review from tannewt March 2, 2021 22:13
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Thank you!

@tannewt tannewt merged commit 1d8933d into adafruit:main Mar 3, 2021
@DavePutz DavePutz deleted the pio_soft_reset branch April 28, 2021 15:22
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.

3 participants