Fault Handler type.
When certain unrecoverable errors occur within the application or SoftDevice the fault handler will be called back. The protocol stack will be in an undefined state when this happens and the only way to recover will be to perform a reset, using e.g. CMSIS NVIC_SystemReset(). If the application returns from the fault handler the SoftDevice will call NVIC_SystemReset().
- Note
- This callback is executed in HardFault context, thus SVC functions cannot be called from the fault callback.
- Parameters
-
[in] | id | Fault identifier. See Fault ID types. |
[in] | pc | The program counter of the instruction that triggered the fault. |
[in] | info | Optional additional information regarding the fault. Refer to each Fault identifier for details. |
- Note
- When id is set to NRF_FAULT_ID_APP_MEMACC, pc will contain the address of the instruction being executed at the time when the fault is detected by the CPU. The CPU program counter may have advanced up to 2 instructions (no branching) after the one that triggered the fault.