This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

control stuck in hardfault

Hi,

   We are using nrf51822 QFAAH00 with SDK 110 v8.1.0 in our project, the application will hangs or not work when control stuck at address 0x6b0 (sometimes at 0x640) programmer in debug mode, when we check the call Stack it list with  NRF_POWER_RAMONx_RAMxON_ONMODE_Msk + 0x6ad, "NRF_POWER_RAMONx_RAMxON_ONMODE_Msk " what this indicates? , CSTACK contents are zero, what is cause for this.

added following screenshot images CSTACK,Registers content after Application hang.

 

Thanks,

Nagaraj

Parents
  • FormerMember
    0 FormerMember

    First, which optimization level do you use for the code? For proper debugging using the callstack, the optimization level has to be set to '0'.

     

    Looking at the register values:

    IPSR Exception number = 0x03 : The interrupt is a hardfault

    LR = 0xFFFFFFF1   --> the hardfault comes from an interrupt

    PC = SP + 0x18 = 0x20002990 : address of the instruction that hardfaults. That instruction can be found in the .map file generated by the project. Which instruction is causing the hardfault?

    PSP: What is its value?

     

     

Reply
  • FormerMember
    0 FormerMember

    First, which optimization level do you use for the code? For proper debugging using the callstack, the optimization level has to be set to '0'.

     

    Looking at the register values:

    IPSR Exception number = 0x03 : The interrupt is a hardfault

    LR = 0xFFFFFFF1   --> the hardfault comes from an interrupt

    PC = SP + 0x18 = 0x20002990 : address of the instruction that hardfaults. That instruction can be found in the .map file generated by the project. Which instruction is causing the hardfault?

    PSP: What is its value?

     

     

Children
Related