Functions that store the Cortex-M Exception Fault information into memory. More...
Content | |
Macros | |
Fault Storage macro definitions. | |
Data Structures | |
struct | ARM_FaultInfo_t |
Fault information structure type definition. More... | |
struct | ARM_FaultInfo_t.Version |
struct | ARM_FaultInfo_t.Content |
struct | ARM_FaultInfo_t.Registers |
struct | ARM_FaultInfo_t.ExceptionState |
struct | ARM_FaultInfo_t.FaultRegisters |
Functions | |
void | ARM_FaultClear (void) |
Clear the saved fault information. | |
uint32_t | ARM_FaultOccurred (void) |
Check if the fault occurred and if the fault information was saved properly. | |
void | ARM_FaultSave (void) |
Save the fault information. | |
void | ARM_FaultExit (void) |
Callback function called after fault information was saved. | |
void | ARM_FaultPrint (void) |
Output decoded fault information via STDIO. | |
Variables | |
ARM_FaultInfo_t | ARM_FaultInfo |
Fault Information. | |
const char | ARM_FaultVersion [] |
Fault component version information. | |
Functions that store the Cortex-M Exception Fault information into memory.
For an overview see Exception Fault Analysis.
This section contains the functions of the component CMSIS-View:Fault:Storage that store the Cortex-M Exception Fault information in uninitialized RAM memory and auxiliary functions.
struct ARM_FaultInfo_t |
Fault information structure type definition.
Structure for storing fault information. Exposed via ARM_FaultInfo.
Data Fields | ||
---|---|---|
uint32_t | MagicNumber | Magic number (ASCII "FltR") |
uint32_t | CRC32 | CRC32 of the structure content (excluding MagicNumber and CRC32 fields) |
uint32_t | Count | Saved faults counter. |
struct ARM_FaultInfo_t.Version | Version | |
struct ARM_FaultInfo_t.Content | Content | |
struct ARM_FaultInfo_t.Registers | Registers | |
struct ARM_FaultInfo_t.ExceptionState | ExceptionState | |
struct ARM_FaultInfo_t.FaultRegisters | FaultRegisters |
struct ARM_FaultInfo_t.Version |
Data Fields | ||
---|---|---|
uint8_t | Minor | Fault information structure version: Minor, see ARM_FAULT_FAULT_INFO_VER_MINOR. |
uint8_t | Major | Fault information structure version: Major, see ARM_FAULT_FAULT_INFO_VER_MAJOR. |
struct ARM_FaultInfo_t.Content |
struct ARM_FaultInfo_t.Registers |
struct ARM_FaultInfo_t.ExceptionState |
struct ARM_FaultInfo_t.FaultRegisters |
ARM_FaultClear | ( | void | ) |
Clear the saved fault information.
Code Example
ARM_FaultOccurred | ( | void | ) |
Check if the fault occurred and if the fault information was saved properly.
Call during startup to check if a fault occurred and if fault information is available, for example decode the fault information using ARM_FaultPrint or ARM_FaultRecord functions.
Code Example
ARM_FaultSave | ( | void | ) |
Save the fault information.
Call from a fault handler to save current fault information into uninitialized RAM memory.
Make sure that function is called without changing the Stack Pointer (SP) and Link Register (LR) registers. This is usually done by branching directly to this function from the fault handler.
This function does not use stack or heap memories.
Code Example
ARM_FaultExit | ( | void | ) |
Callback function called after fault information was saved.
The default implementation will do a system reset.
If a system reset is not desired, you need to provide a custom implementation of this function with the desired functionality.
Code Example of overriding ARM_FaultExit function not to reset the system but to loop endlessly:
ARM_FaultPrint | ( | void | ) |
Output decoded fault information via STDIO.
To use ARM_FaultPrint, add the ARM_FaultPrint template implementation to the project.
Code Example
ARM_FaultInfo_t ARM_FaultInfo |
Fault Information.
Variable for storing fault information.
const char ARM_FaultVersion[] |
Fault component version information.
Variable for storing Arm Fault component version.