102typedef enum : uint32_t {
void ra8_exception_set_persist_hook(ra8_exception_persist_fn hook)
Register (or clear) the post-decode fault-persistence hook.
void ra8_exception_report_nmi(const ra8_exception_frame_t *frame, uint32_t nmisr)
Report an NMI with its ICU cause register, then halt.
void ra8_exception_capture_diagnostics(ra8_exception_diagnostics_t *out)
Read the current SCB fault-status registers.
void(* ra8_exception_persist_fn)(const volatile ra8_exception_last_t *decoded)
Post-decode persistence sink invoked once the snapshot is complete.
ra8_exception_magic_t
Sentinel marking a fully-written g_ra8_exception_last snapshot.
@ k_ra8_exc_magic_valid
Snapshot is fully populated.
volatile ra8_exception_last_t g_ra8_exception_last
The one fixed-SRAM ra8_exception_last_t snapshot instance.
void ra8_exception_report(const ra8_exception_frame_t *frame, uint32_t exc_number)
Emit a full fault dump over the log backend.
SCB fault-status register snapshot.
uint32_t dfsr
Debug Fault Status Register.
uint32_t sfar
SecureFault Address Reg (if SFSR.SFARVALID).
uint32_t hfsr
HardFault Status Register.
uint32_t bfar
BusFault Address Register (if BFARVALID).
uint32_t sfsr
SecureFault Status Register (RAZ from NS).
uint32_t afsr
Auxiliary Fault Status Register.
uint32_t cfsr
Configurable Fault Status Register.
uint32_t mmfar
MemManage Fault Address Reg (if MMARVALID).
Stacked registers pushed by the Cortex-M exception entry.
uint32_t r1
General-purpose register R1.
uint32_t xpsr
Program status register.
uint32_t r0
General-purpose register R0.
uint32_t pc
Program counter at fault.
uint32_t r12
Scratch register R12.
uint32_t lr
Link register (return addr).
uint32_t r2
General-purpose register R2.
uint32_t r3
General-purpose register R3.
Fixed-SRAM post-mortem snapshot of the most recent fault or NMI.
uint32_t magic
k_ra8_exc_magic_valid when valid.
uintptr_t frame_ptr
Raw stack pointer at entry.
uint32_t nmisr
ICU NMISR cause (NMI path only).
uint32_t exc_number
Architectural exception number.
ra8_exception_diagnostics_t diag
SCB fault-status snapshot.
ra8_exception_frame_t frame
Stacked GPR frame.