Cortex-M fault decoder

Paste the fault status registers from a crashed Cortex-M and see what each bit means.

Decoder

Enter at least one register value in hexadecimal, then press Decode.

Everything runs in your browser. The values you enter are not sent anywhere.

How to use it

  1. Stop in your fault handler, or read the registers from a crash log.
  2. Copy the value of CFSR, and of HFSR and SFSR if you have them.
  3. Paste them above and press Decode.

In GDB you can read a register with its address:

(gdb) x/wx 0xE000ED28

What the registers are

RegisterAddressWhat it reports
CFSR0xE000ED28MemManage, BusFault and UsageFault causes
HFSR0xE000ED2CWhy a HardFault was taken
SFSR0xE000EDE4SecureFault causes, on Armv8-M with TrustZone

The status bits stay set until software clears them, so a value can show more than one fault if earlier ones were never cleared.

The cheat sheet lists every bit in one place.