Skip to content

Commit

Permalink
Merge pull request #2381 from BrewBlox/fix/hardfault-handler
Browse files Browse the repository at this point in the history
Fix hardfault handler to SOS again
  • Loading branch information
sergeuz committed Dec 7, 2021
2 parents 381b538 + 513651a commit 5af90dd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion bootloader/src/nRF52840/nrf_it.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ void HardFault_Handler(void)
" mrseq r0, msp \n"
" mrsne r0, psp \n"
" ldr r1, [r0, #24] \n"
" ldr r2, =handler2_address_const \n"
" ldr r2, handler2_address_const \n"
" bx r2 \n"
" .align 4 \n"
" handler2_address_const: .word prvGetRegistersFromStack \n"
);
}
Expand Down
3 changes: 2 additions & 1 deletion hal/src/nRF52840/core_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ void HardFault_Handler(void) {
" mrseq r0, msp \n"
" mrsne r0, psp \n"
" ldr r1, [r0, #24] \n"
" ldr r2, =handler2_address_const \n"
" ldr r2, handler2_address_const \n"
" bx r2 \n"
" .align 4 \n"
" handler2_address_const: .word prvGetRegistersFromStack \n"
);
}
Expand Down
3 changes: 2 additions & 1 deletion hal/src/stm32f2xx/core_hal_stm32f2xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ void HardFault_Handler(void)
" mrseq r0, msp \n"
" mrsne r0, psp \n"
" ldr r1, [r0, #24] \n"
" ldr r2, =handler2_address_const \n"
" ldr r2, handler2_address_const \n"
" bx r2 \n"
" .align 4 \n"
" handler2_address_const: .word prvGetRegistersFromStack \n"
);
}
Expand Down

0 comments on commit 5af90dd

Please sign in to comment.