Hardfault handler on wakeup

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Hardfault handler on wakeup

跳至解决方案
1,178 次查看
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?

 

标签 (1)
0 项奖励
回复
1 解答
1,103 次查看
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

在原帖中查看解决方案

3 回复数
1,164 次查看
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 项奖励
回复
1,155 次查看
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 项奖励
回复
1,104 次查看
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