Hardfault handler on wakeup

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Hardfault handler on wakeup

Jump to solution
837 Views
PederMoeller
Contributor II

The power down functions POWER_EnterDeepSleep()/POWER_EnterPowerDown()/POWER_EnterDeepPowerDown() in SDK_2_12_0_LPCXpresso55S28\devices\LPC55S28\drivers\fsl_power.hdevices\LPC55S28\drivers\fsl_power.h all have the comment that

3 - The HARD FAULT handler should execute from SRAM. (The Hard fault handler should initiate a full chip reset)

It seems that wakeup from deep sleep works with the hard fault handler being in FLASH and not in SRAM but maybe it is different for some of the other power down modes?

 

Labels (1)
0 Kudos
1 Solution
762 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

" After enter deep-sleep mode, the MCU and RAM remained powered, but flash and ROM are shut down. So the code in deep-sleep mode need to execute from RAM.

In our SDK demo, we used GPIO pin interrupt to wakeup from deep-sleep mode. And the GPIO interrupt is one of the wakeup sources of deep-sleep mode. So after triggering GPIO interrupt, the flash is powered first, and then execute handler from flash.

But the hardfault signal is not the wakeup source of deep-sleep mode, so we need to execute the hardfault handler from RAM and then reset the chip. "

 

BR

Alice

View solution in original post

3 Replies
823 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello PederMoeller,

Could you please share more information about the meaning of "It seems that wakeup from deep sleep works with the hard fault handler being in FLASH and not in SRAM but maybe it is different for some of the other power down modes?"? Thanks!

 

BR

Alice

0 Kudos
814 Views
PederMoeller
Contributor II

1. We have our hard fault handler in FLASH.

2. We can go to deep sleep (using POWER_EnterDeepSleep()) and wakeup on GPIO transition. 

3. The function POWER_EnterDeepSleep() says that the HARD FAULT handler should execute from SRAM. What does that mean? Is it correct? We can wakeup from deep sleep even though our HARD FAULT handler is in FLASH.

 

0 Kudos
763 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

" After enter deep-sleep mode, the MCU and RAM remained powered, but flash and ROM are shut down. So the code in deep-sleep mode need to execute from RAM.

In our SDK demo, we used GPIO pin interrupt to wakeup from deep-sleep mode. And the GPIO interrupt is one of the wakeup sources of deep-sleep mode. So after triggering GPIO interrupt, the flash is powered first, and then execute handler from flash.

But the hardfault signal is not the wakeup source of deep-sleep mode, so we need to execute the hardfault handler from RAM and then reset the chip. "

 

BR

Alice