SuperTinyKernel™ RTOS 1.08.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
Loading...
Searching...
No Matches
stk::FaultContext Struct Reference

ARMv7-M/ARMv8-M system fault exception context state capture. More...

#include <stk_arch_arm-cortex-m.h>

Collaboration diagram for stk::FaultContext:

Classes

struct  Mpu
 Hardware Memory Protection Unit (MPU) status register snapshot. More...

Public Member Functions

void Fill (const Word *stacked_regs, Word exc_return)
 Populate fault context registers and hardware MPU state from an exception stack frame.

Public Attributes

hw::ExceptionFrame frame
 Saved hardware exception stack frame.
Word CFSR
 Configurable Fault Status Register (CFSR: MemManage, BusFault, UsageFault).
Word HFSR
 HardFault Status Register (HFSR).
Word MMFAR
 Memory Management Fault Address Register (MMFAR).
Word BFAR
 BusFault Address Register (BFAR).
Word AFSR
 Auxiliary Fault Status Register (AFSR).
Word CONTROL
 Core CONTROL register state snapshot.
Word EXC_RETURN
 Exception return magic value (EXC_RETURN).
bool mmfar_valid
 Flag indicating validity of MMFAR address value (derived from CFSR.MMARVALID).
bool bfar_valid
 Flag indicating validity of BFAR address value (derived from CFSR.BFARVALID).

Detailed Description

ARMv7-M/ARMv8-M system fault exception context state capture.

Preserves exception stack frames, core system control fault status registers (CFSR, HFSR, MMFAR, BFAR, AFSR), execution context status (CONTROL, EXC_RETURN), and hardware Memory Protection Unit (MPU) state snapshots at the time of fault occurrence for post-mortem diagnostics.

See also
hw::ExceptionFrame, Fill

Definition at line 484 of file stk_arch_arm-cortex-m.h.

Member Function Documentation

◆ Fill()

void stk::FaultContext::Fill ( const Word * stacked_regs,
Word exc_return )

Populate fault context registers and hardware MPU state from an exception stack frame.

Parameters
[in]stacked_regsPointer to the hardware-stacked exception register frame.
[in]exc_returnEXC_RETURN execution state value captured at fault entry.

Member Data Documentation

◆ AFSR

Word stk::FaultContext::AFSR

Auxiliary Fault Status Register (AFSR).

Definition at line 514 of file stk_arch_arm-cortex-m.h.

◆ BFAR

Word stk::FaultContext::BFAR

BusFault Address Register (BFAR).

Definition at line 513 of file stk_arch_arm-cortex-m.h.

◆ bfar_valid

bool stk::FaultContext::bfar_valid

Flag indicating validity of BFAR address value (derived from CFSR.BFARVALID).

Definition at line 524 of file stk_arch_arm-cortex-m.h.

◆ CFSR

Word stk::FaultContext::CFSR

Configurable Fault Status Register (CFSR: MemManage, BusFault, UsageFault).

Definition at line 510 of file stk_arch_arm-cortex-m.h.

◆ CONTROL

Word stk::FaultContext::CONTROL

Core CONTROL register state snapshot.

Definition at line 515 of file stk_arch_arm-cortex-m.h.

◆ EXC_RETURN

Word stk::FaultContext::EXC_RETURN

Exception return magic value (EXC_RETURN).

Definition at line 516 of file stk_arch_arm-cortex-m.h.

◆ frame

hw::ExceptionFrame stk::FaultContext::frame

Saved hardware exception stack frame.

Definition at line 509 of file stk_arch_arm-cortex-m.h.

◆ HFSR

Word stk::FaultContext::HFSR

HardFault Status Register (HFSR).

Definition at line 511 of file stk_arch_arm-cortex-m.h.

◆ MMFAR

Word stk::FaultContext::MMFAR

Memory Management Fault Address Register (MMFAR).

Definition at line 512 of file stk_arch_arm-cortex-m.h.

◆ mmfar_valid

bool stk::FaultContext::mmfar_valid

Flag indicating validity of MMFAR address value (derived from CFSR.MMARVALID).

Definition at line 523 of file stk_arch_arm-cortex-m.h.


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