1
0
forked from me/IronOS

Swap breakpoints to resets to try and prevent lockups

This commit is contained in:
Ben V. Brown
2018-03-29 21:36:16 +11:00
parent 762236b485
commit fe5ee91104
3 changed files with 15 additions and 23 deletions

View File

@@ -12,35 +12,27 @@ extern TIM_HandleTypeDef htim1; //used for the systick
/******************************************************************************/
void NMI_Handler(void) {
NVIC_SystemReset();
}
//We have the assembly for a breakpoint trigger here to halt the system when a debugger is connected
// Hardfault handler, often a screwup in the code
void HardFault_Handler(void) {
while (1) {
asm("bkpt");
}
NVIC_SystemReset();
}
// Memory management unit had an error
void MemManage_Handler(void) {
while (1) {
asm("bkpt");
}
NVIC_SystemReset();
}
// Prefetcher or busfault occured
void BusFault_Handler(void) {
while (1) {
asm("bkpt");
}
NVIC_SystemReset();
}
void UsageFault_Handler(void) {
while (1) {
asm("bkpt");
}
NVIC_SystemReset();
}
void DebugMon_Handler(void) {