2014-03-18 11:38 AM
Dear all,
i am still in a beginner phase with stm32, and trying to output a square wave from a GPIO PORTA pin. But program loops in hardfault: > step target state: halted target halted due to single-step, current mode: Thread xPSR: 0x41000000 pc: 0x0800224c msp: 0x20020000 halted: PC: 0x0800224c > step target state: halted target halted due to single-step, current mode: Handler HardFault xPSR: 0x41000003 pc: 0x08000900 msp: 0x2001ffe0 halted: PC: 0x08000900 > step target state: halted target halted due to single-step, current mode: Handler HardFault xPSR: 0x41000003 pc: 0x08000902 msp: 0x2001ffe0 halted: PC: 0x08000902 > step target state: halted target halted due to single-step, current mode: Thread xPSR: 0x41000000 pc: 0x0800224c msp: 0x20020000 halted: PC: 0x0800224c > What could cause this ? Thanks angelo #hard-fault2014-03-18 12:01 PM
You'd need to examine the code at the faulting address, and the register content to understand what is failing.
You are probably writing to an illegal memory address2014-03-18 02:25 PM
Debugging Cortex-M Hard Faults
Take a look at the links & info here:
http://community.arm.com/thread/5414
Covers Cortex-M0, Cortex-M0+, Cortex-M3, Cortex-M4