STM32 RTOS 0.2.3
Bare-metal preemptive RTOS for STM32F446RE
Loading...
Searching...
No Matches
FaultRecord_t Struct Reference

What Fault_Handler saw. More...

#include <fault.h>

Data Fields

uint32_t exception
 ICSR.VECTACTIVE: 3 HardFault, 4 MemManage, 5 BusFault, 6 UsageFault.
uint32_t exc_return
 LR on entry; bit 2 set means the frame is on PSP.
uint32_t cfsr
 CFSR: MMFSR (7:0), BFSR (15:8), UFSR (31:16).
uint32_t hfsr
 HFSR: FORCED means a configurable fault escalated.
uint32_t mmfar
 MMFAR; the fault address only if CFSR.MMARVALID.
uint32_t bfar
 BFAR; the fault address only if CFSR.BFARVALID.
bool frame_valid
 The registers below were read from the stacked frame.
uint32_t r0
 Stacked R0.
uint32_t r1
 Stacked R1.
uint32_t r2
 Stacked R2.
uint32_t r3
 Stacked R3.
uint32_t r12
 Stacked R12.
uint32_t lr
 Stacked LR: the faulting function's return address.
uint32_t pc
 Stacked PC: the faulting instruction, or the next one for an imprecise fault.
uint32_t xpsr
 Stacked xPSR.

Detailed Description

What Fault_Handler saw.

All zero until the first fault.

Definition at line 34 of file fault.h.

Field Documentation

◆ exception

uint32_t FaultRecord_t::exception

ICSR.VECTACTIVE: 3 HardFault, 4 MemManage, 5 BusFault, 6 UsageFault.

Definition at line 36 of file fault.h.

Referenced by faultCapture().

◆ exc_return

uint32_t FaultRecord_t::exc_return

LR on entry; bit 2 set means the frame is on PSP.

Definition at line 37 of file fault.h.

Referenced by faultCapture().

◆ cfsr

uint32_t FaultRecord_t::cfsr

CFSR: MMFSR (7:0), BFSR (15:8), UFSR (31:16).

Definition at line 38 of file fault.h.

Referenced by faultCapture().

◆ hfsr

uint32_t FaultRecord_t::hfsr

HFSR: FORCED means a configurable fault escalated.

Definition at line 39 of file fault.h.

Referenced by faultCapture().

◆ mmfar

uint32_t FaultRecord_t::mmfar

MMFAR; the fault address only if CFSR.MMARVALID.

Definition at line 40 of file fault.h.

Referenced by faultCapture().

◆ bfar

uint32_t FaultRecord_t::bfar

BFAR; the fault address only if CFSR.BFARVALID.

Definition at line 41 of file fault.h.

Referenced by faultCapture().

◆ frame_valid

bool FaultRecord_t::frame_valid

The registers below were read from the stacked frame.

False when CFSR.MSTKERR or STKERR says stacking failed, so the frame is not there; they are then 0.

Definition at line 45 of file fault.h.

Referenced by faultCapture().

◆ r0

uint32_t FaultRecord_t::r0

Stacked R0.

Definition at line 46 of file fault.h.

Referenced by faultCapture().

◆ r1

uint32_t FaultRecord_t::r1

Stacked R1.

Definition at line 47 of file fault.h.

Referenced by faultCapture().

◆ r2

uint32_t FaultRecord_t::r2

Stacked R2.

Definition at line 48 of file fault.h.

Referenced by faultCapture().

◆ r3

uint32_t FaultRecord_t::r3

Stacked R3.

Definition at line 49 of file fault.h.

Referenced by faultCapture().

◆ r12

uint32_t FaultRecord_t::r12

Stacked R12.

Definition at line 50 of file fault.h.

Referenced by faultCapture().

◆ lr

uint32_t FaultRecord_t::lr

Stacked LR: the faulting function's return address.

Definition at line 51 of file fault.h.

Referenced by faultCapture().

◆ pc

uint32_t FaultRecord_t::pc

Stacked PC: the faulting instruction, or the next one for an imprecise fault.

Definition at line 52 of file fault.h.

Referenced by faultCapture().

◆ xpsr

uint32_t FaultRecord_t::xpsr

Stacked xPSR.

Definition at line 53 of file fault.h.

Referenced by faultCapture().


The documentation for this struct was generated from the following file: