part6/err_handler.c
// Softdevice fault handler. Prints out useful information before resetting

Softdevice fault handler. Prints out useful information before resetting
Softdevice fault handler . Prints out useful information before resetting
void fault_handler(uint32_t id, uint32_t pc, uint32_t info){
  switch (id){
  case NRF_FAULT_ID_SD_ASSERT: 
    printf("Hardfault assertion at address 0x%08X\n",pc);
    break;
  case NRF_FAULT_ID_APP_MEMACC:
    printf("Memory access violation at address 0x%08X accessing 0x%08X\n",pc,info);
    break;
  default:
    printf("Unknown hardfault (ID=%d) at address 0x%08X\n",id,pc);
  }
}
void fault_handler ( uint32_t id , uint32_t pc , uint32_t info ) { switch ( id ) { case NRF_FAULT_ID_SD_ASSERT : printf ( " \n " , pc ) ; break ; case NRF_FAULT_ID_APP_MEMACC : printf ( " \n " , pc , info ) ; break ; default : printf ( " \n " , id , pc ) ; } }
Softdevice fault handler.
Softdevice fault handler .