Hard Fault when entering POWER_EnterDeepSleep

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Hard Fault when entering POWER_EnterDeepSleep

ソリューションへジャンプ
2,582件の閲覧回数
bentuline
Contributor II

Hello,

I'm trying to implement deep sleep on an LPC54605, and I've run into a problem where upon entering the function POWER_EnterDeepSleep I'll get a hard fault exception (IBUSERR specifically, seen through MCUXpresso LPC Link debugger). Doesn't seem to matter what arguments I provide. I've been making changes to an existing software project, and the chunk of code that performs the sleep/wakeup does seem to work on this hardware so I don't think there's any fundamental hardware issue here. I haven't been able to spot any noticeable differences in the code, even if I move the sleep routine to be the first thing run after clock initialization I'll still see this error. 

Are there any known things to avoid when entering deep sleep on this chip? Most issues I've seen have been with wakeup, although that doesn't seem to be my problem. Alternatively, is the source available for this deep sleep mode? The fact that the driver source is only provided as a binary doesn't help here. 

ラベル(2)
0 件の賞賛
返信
1 解決策
2,532件の閲覧回数
bentuline
Contributor II

I think I found the difference actually, and it's sort of a result of the code I had taken over. I hadn't realized a coworker of mine had taken  SYSCON_PDRUNCFG_PDEN_SRAM1_2_3_MASK out of the 'exclude from deep sleep' bitmask. It looks like due to the growth of the application these banks had started to be used. So I guess the moral of the story is only disable what you know for a fact you're not using. 

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
2,533件の閲覧回数
bentuline
Contributor II

I think I found the difference actually, and it's sort of a result of the code I had taken over. I hadn't realized a coworker of mine had taken  SYSCON_PDRUNCFG_PDEN_SRAM1_2_3_MASK out of the 'exclude from deep sleep' bitmask. It looks like due to the growth of the application these banks had started to be used. So I guess the moral of the story is only disable what you know for a fact you're not using. 

0 件の賞賛
返信
2,530件の閲覧回数
bentuline
Contributor II

Hi Jun, 

I can't seem to replicate this issue in a different environment. I guess what my question really is, is what are the prerequisites to safely enter deep sleep?

I can see that the fault occurs on the instruction "mov.w r12,#128", when r12 has a value of 0xffefbf7f (which sounds incorrect). Assuming the attached fsl_power_lib.c from the 2.3 SDK is still fairly representative of the 2.10 SDK, I imagine this corresponds to the line below based on the constant value:

 

SYSCON->AHBCLKCTRLSET[0] = SYSCON_AHBCLKCTRL_FLASH_MASK;

Not really sure why it would crash here to be honest, since it should just load a constant value into r12. I'm guessing the fault really occurs earlier but it's not clear what the problem would be. 

0 件の賞賛
返信
2,554件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

How can I reproduce your issue?

under SDK folder there is low power demo code power_manager_lpc. Could you test how to revise this demo to showcase your problem?

Thanks,

Jun Zhang

0 件の賞賛
返信