Decode Cortex-M fault registers
decode_cortex_m_faultDecodes Arm Cortex-M fault status register values (CFSR, and optionally HFSR, MMFAR, BFAR, SFSR, SFAR, EXC_RETURN and the stacked PC) into the faults they record and the checks to make next. For Cortex-M3, M4, M7, M33, M55 and M85. Use it when firmware lands in HardFault, MemManage, BusFault, UsageFault or SecureFault and the register values are known.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"cfsr": "<cfsr>"
},
"name": "decode_cortex_m_fault"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bfar | No | BusFault Address Register, read from 0xE000ED38. | |
| cfsr | Yes | Configurable Fault Status Register, read from 0xE000ED28. | |
| hfsr | No | HardFault Status Register, read from 0xE000ED2C. | |
| sfar | No | SecureFault Address Register, read from 0xE000EDE8. Cores with TrustZone only. | |
| sfsr | No | SecureFault Status Register, read from 0xE000EDE4. Cores with TrustZone only. | |
| mmfar | No | MemManage Fault Address Register, read from 0xE000ED34. | |
| exc_return | No | The value of LR at the first instruction of the fault handler, 0xFFFFFFxx. | |
| stacked_pc | No | The PC value in the exception stack frame. |