Skip to content

Commit

Permalink
Disable the MPU during the memmanage fault handler
Browse files Browse the repository at this point in the history
  • Loading branch information
mck1117 committed Feb 17, 2025
1 parent dec8591 commit 553e42f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions firmware/hw_layer/main_hardfault.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ void UsageFault_Handler_C(void* sp) {
}

void MemManage_Handler_C(void* sp) {
// Disable the MPU so we don't get smacked with a double fault while trying to save state
mpuDisable();

//For HardFault/BusFault this is the address that was accessed causing the error
faultAddress = SCB->MMFAR;

Expand Down

0 comments on commit 553e42f

Please sign in to comment.