Set a Data Watchpoint on 0x20000000 ( Debug → Breakpoints → Access ). When the write happens, Keil halts exactly at the offending line. The Culprit A DMA buffer was accidentally initialized to NULL (0), and the DMA controller wrote to 0x20000000 instead of the intended buffer. Lesson Learned Keil μVision isn't just a text editor with a compile button — its debugging ecosystem (fault exception viewer, live register tracking, watchpoints, map file analyzer) turns a frustrating hardfault into a solvable puzzle. Would you like a shorter version, or a deep-dive into one specific debugging feature like Event Recorder or Serial Wire Viewer (SWV) ?
Set a breakpoint just before the fault, step through assembly. You spot a STR instruction trying to write to 0x20000000 — wait, that's the start of RAM, reserved for vector table. Bingo. keil uvision
Open Map File ( Project → Options → Output → Browse Info ). Search for 0x20000000 . Nothing should be there except __initial_sp . Your code is writing to it via a wild pointer. Set a Data Watchpoint on 0x20000000 ( Debug