After a HardFault, read CFSR, HFSR, MMFAR and BFAR from the debugger, and the stacked registers.
Paste them in.
Read which fault happened, at which address, and where the code was (PC and LR).
Questions
Where do I find these registers?
CFSR is at 0xE000ED28, HFSR at 0xE000ED2C, MMFAR at 0xE000ED34 and BFAR at 0xE000ED38. The stacked PC and LR are on the stack the EXC_RETURN value points to.
Why is BFAR not valid?
BFAR holds an address only when CFSR’s BFARVALID bit is set; imprecise bus faults do not record one.
Related tools
Cortex-M debugger in the browser (ST-LINK, CMSIS-DAP): Halt, step and reset an Arm Cortex-M; watch and write global variables from the ELF live with plots; SEGGER RTT terminal; live SVD peripheral registers; breakpoints, watchpoints and HardFault capture. Over WebUSB, nothing to install.
Register viewer (SVD): CMSIS-SVD peripherals, registers and bit fields; decode a value; find the register at an address; C defines.
Serial terminal (Web Serial): UART console in the browser: baud, parity, text/hex, timestamps, log to file, macros, DTR/RTS; a live plotter and send/expect scripts.
Number converter: Hex, decimal, binary, signed and ASCII, in either byte order.