Default HardFault exception implementation. More...
Data Structures | |
struct | HardFault_stack |
Contents of the stack. More... | |
Typedefs | |
typedef struct HardFault_stack | HardFault_stack_t |
Contents of the stack. More... | |
Functions | |
void | HardFault_process (HardFault_stack_t *p_stack) |
Function for processing HardFault exceptions. More... | |
Default HardFault exception implementation.
typedef struct HardFault_stack HardFault_stack_t |
Contents of the stack.
This structure is used to re-create the stack layout after a HardFault exception was raised.
void HardFault_process | ( | HardFault_stack_t * | p_stack | ) |
Function for processing HardFault exceptions.
An application that needs to process HardFault exceptions should provide an implementation of this function. It will be called from the HardFault handler. If no implementation is provided, the library uses a default one, which just restarts the MCU.
p_stack | Pointer to the stack bottom. This pointer might be NULL if the HardFault was called when the main stack was the active stack and a stack overrun is detected. In such a situation, the stack pointer is reinitialized to the default position, and the stack content is lost. |