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

Stop random crashes while writing to flash #730

Merged
merged 3 commits into from
Jul 30, 2022
Merged

Stop random crashes while writing to flash #730

merged 3 commits into from
Jul 30, 2022

Conversation

earlephilhower
Copy link
Owner

FreeRTOS SMP was updated to:
a) Move ths SYSTICK handler, which cannot be disabled and can fire
even with IRQs disabled, to RAM
b) Add a flag from the core to the SYSTICK handler to hold off on
any PendSV (task switch) calls while we are doing the idleOtherCore.

The core now sets this flag, _holdPendSV, and adds add'l FreeRTOS SMP
calls to really, really tell the OS we can't, don't, and better not
be swapped out while writing to flash.

Fixes #719

FreeRTOS SMP was updated to:
a) Move ths SYSTICK handler, which cannot be disabled and can fire
   even with IRQs disabled, to RAM
b) Add a flag from the core to the SYSTICK handler to hold off on
   any PendSV (task switch) calls while we are doing the idleOtherCore.

The core now sets this flag, _holdPendSV, and adds add'l FreeRTOS SMP
calls to really, really tell the OS we can't, don't, and better not
be swapped out while writing to flash.

Fixes #719
@earlephilhower earlephilhower merged commit 005cba3 into master Jul 30, 2022
@earlephilhower earlephilhower deleted the fritos branch July 30, 2022 05:40
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.

EEPROM.commit() hangs apparently due to rp2040.idleOtherCore() / rp2040.resumeOtherCore()
1 participant