Our free hard fault exception crash analyzis video tutorial will teach you how to analyse and fix Cortex-M system crashes which can be very difficult and time consuming. Hard faults can occur due to division by zero, stack overruns, pointer errors etc.
By using the methods and tools outlined in this video, the root cause and location of hardfault system crashes in popular Cortex-M based microcontrollers like STM32, Kinetis, LPC etc. can be easily identified in seconds, rather than hours.
Typical problems that can be detected by a debugger fault analyzer are division by zero errors, accessing invalid memory locations or accessing memory locations on misaligned boundaries. The hard fault crash analyzer significantly aids embedded developers to quickly understand why the system has crashed, thus improving productivity. The crash analyzer not only tells you WHY the CPU crashed, but also WHERE in the code, and under WHAT circumstances.
When a hard fault has occurred, the code line where the system crash appeared can be displayed in the source code editor and the disassembly view with just a mouse-click. Faults are categorized broadly into bus, usage and memory faults. Bus faults occurs when an invalid access attempt is made across the bus, either of a peripheral or memory location. Usage faults are the result of illegal instructions or other program errors. Memory errors can include attempts of access an illegal location or rule violations of the memory protection unit (MPU).
To further aid fault analysis, an exception stack frame visualization option provides a snapshot of MCU register values at the time of the crash. Isolating the fault to an individual instruction allows the developer to reconstruct the MCU registers to the condition they were when the faulty instruction was executed.
By using the hard fault crash analyzis capabilities of your Cortex-M device, you can easily detect and locate many hard-to-find runtime errors.