Skip to content

struct osFaultRecord_t ​

CPU state at the last crash. More...

#include <kernel/fault.h>

Public Attributes ​

Name
uint32_tboot
uint32_tuptime_ms
uint32_tpc
uint32_tlr
uint32_tpsr
uint32_tcfsr
uint32_thfsr
uint32_tfar
uint16_tline
uint8_tkind
uint8_t_pad
char[(12)]thread

Detailed Description ​

cpp
struct osFaultRecord_t;

CPU state at the last crash.

Lives in reboot-safe RAM. The newest crash overwrites the previous one: each crash ends its boot, so the record always describes the run that ended last by a crash. Compare boot with osGetRebootCount() to tell whether that was the previous boot.

Public Attributes Documentation ​

variable boot ​

cpp
uint32_t osFaultRecord_t::boot

osGetRebootCount() of the boot that crashed.

variable uptime_ms ​

cpp
uint32_t osFaultRecord_t::uptime_ms

Kernel tick count at the crash.

variable pc ​

cpp
uint32_t osFaultRecord_t::pc

Fault exceptions: the faulting instruction from the exception frame. Assert and pure virtual call: the return address into the caller. 0 where neither exists.

variable lr ​

cpp
uint32_t osFaultRecord_t::lr

Fault exceptions: LR from the exception frame, else 0.

variable psr ​

cpp
uint32_t osFaultRecord_t::psr

Fault exceptions: xPSR from the exception frame, else 0.

variable cfsr ​

cpp
uint32_t osFaultRecord_t::cfsr

SCB->CFSR and SCB->HFSR at the crash; 0 on cores without them.

variable hfsr ​

cpp
uint32_t osFaultRecord_t::hfsr

variable far ​

cpp
uint32_t osFaultRecord_t::far

Faulting data address (BFAR or MMFAR) if CFSR marks it valid, else 0.

variable line ​

cpp
uint16_t osFaultRecord_t::line

Source line of a failed configASSERT, else 0.

variable kind ​

cpp
uint8_t osFaultRecord_t::kind

osFaultKind_t

variable _pad ​

cpp
uint8_t osFaultRecord_t::_pad

variable thread ​

cpp
char osFaultRecord_t::thread[(12)]

Running thread, or the overflowing one for osFaultStackOverflow; "" before the scheduler runs.