常见问答

FAQ

How does a user check the state before entering hard fault when a hard fault occurs on a M0/M4 microcontroller (MCU)?  Issue Date:2015-10-16

Since the hard fault is an exception interrupt, user can search code address from the memory address recorded by a stack pointer before entering a hardfault handler, and find the hard fault according to the address.

The steps are as follows:

  1. Get a starting address of the stack pointer in Debug mode;
  2. Enter the starting address to query stack of information in the memory;
  3. The stacked 7th address is the code address before entering an interrupt;
  4. View the content of the code address in the program window, which is the state before entering the hard fault. 

•  Keil RVMDK:

•  IAR EWARM:

Products: 마이크로컨트롤러(MCU) ,Arm Cortex-M0 MCUs ,M051 시리즈 ,M0518 시리즈 ,M0519 시리즈 ,Mini51 시리즈 ,Nano100/102 시리즈 ,Nano110/112 LCD 시리즈 ,Nano120 USB 시리즈 ,Nano130 어드밴스드 시리즈 ,NUC029 시리즈 ,NUC100/200 어드밴스드 시리즈 ,NUC120/122/123/220 USB 시리즈 ,NUC130/230 CAN 시리즈 ,NUC131/NUC1311 CAN 시리즈 ,NUC140/240 연결(Connectivity) 시리즈 ,Arm Cortex-M4 MCUs ,M451 시리즈 ,M451M 시리즈 ,M452 USB 시리즈 ,M453 CAN 시리즈 ,NUC442/472 시리즈 ,NUC505 시리즈
Applications:
Function: Software and Tools,Development-Environment,IAR,Keil