The code get reset after __WFI() when enterning deep sleep mode

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

The code get reset after __WFI() when enterning deep sleep mode

ソリューションへジャンプ
1,591件の閲覧回数
MithileshKumar
Contributor II

Hi 

I am try to put my system in low power mode. I am able to switch the other power states but when I try to switch to SystemIdle state, which tries to put system in deep sleep mode, my code get reset while executing __WFI().

Can someone please suggest the probable cause and solution to it.

I have taken sdk code and integrated in my project running on IAR integrated Eclipse workbench.

ラベル(1)
0 件の賞賛
返信
1 解決策
1,536件の閲覧回数
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Thank you for your additional information.

If the low power enable (WDZST) bit is set, the WDOG timer operation will be suspended in low power STOP or DOZE mode.
To disable wdog first unlock it.

DisableInterrupts; // disable global interrupt
WDOG_CNT = 0xD928C520; //unlock watchdog
WDOG_CS &= ~WDOG_CS_EN_MASK; //disable watchdog
EnableInterrupts; //enable global interrupt

If you have more questions do not hesitate to ask me.
Best regards,
Omar

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
1,564件の閲覧回数
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello
Hope you are well.
Please follow these steps, it is important to set DOZE mode:

Omar_Anguiano_0-1658446525837.png

Additionally, make sure that there is no pending interruption when entering in that power mode.

If you have more questions do not hesitate to ask me.
Best regards,
Omar

0 件の賞賛
返信
1,561件の閲覧回数
MithileshKumar
Contributor II

Thanks for the response..

We have gone through the application note as well as taken reference from SDK.

We are disabling the interrupts as well as disabling Systick so that it may not cause any issue.

On analysis we observed that while executuing __WFI(), it is not waiting for wakeup source to generate interrupt but watchdog is resetting the system.

We tried disabling the watching before calling __WFI(), but the watchdog is not getting disabled.

0 件の賞賛
返信
1,537件の閲覧回数
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Thank you for your additional information.

If the low power enable (WDZST) bit is set, the WDOG timer operation will be suspended in low power STOP or DOZE mode.
To disable wdog first unlock it.

DisableInterrupts; // disable global interrupt
WDOG_CNT = 0xD928C520; //unlock watchdog
WDOG_CS &= ~WDOG_CS_EN_MASK; //disable watchdog
EnableInterrupts; //enable global interrupt

If you have more questions do not hesitate to ask me.
Best regards,
Omar

0 件の賞賛
返信
1,568件の閲覧回数
MithileshKumar
Contributor II

Please can anybody help on this

0 件の賞賛
返信