Hi,
I am having some trouble entering Stop mode from Run Mode 3..0.
The problem is that it seems to stop at while(MC_ME.GS.B.S_MTRANS); and never recover.
I searched for answers and found this post Stop mode migrating between MPC5748G and MPC5746C - NXP Community and I have some issues regarding the post, because it looks identical to what I am seeing.
First, shouldn't the current mode be Stop mode, instead of Run Mode 0? Second, shouldn't it pass the statement while(MC_ME.GS.B.S_CURRENT_MODE != 0x10); then, in my case, stop at while(MC_ME.GS.B.S_CURRENT_MODE != 0x07); /*The mode before I went into stop mode */
I am trying to run the example "Modes Low Power" from AN2865 Qorivva Simple Cookbook and I have looked at other Low power examples. I can successfully run the RTC so I know that works. Everything looks right except for transitioning to Stop mode. I can see the event in RTC and an interrupt in WKPU, but there is no response.
PS. I thought I posted this yesterday.
Thank you very much for your support.
解決済! 解決策の投稿を見る。
You are right, command
while(MC_ME.GS.B.S_CURRENT_MODE != STOP_MODE);
... doesn't make sense because the core is not running in stop mode. And after wake up, current mode is not stop mode anymore.
Regards,
Lukas
Hi Lukas,
I switched over to using the Lauterbach.
I now see that it is breaking at while(MC_ME.GS.B.S_CURRENT_MODE != STOP_MODE);
That statement is not in your code, but the code in the referenced example does have it.
When ever I switch modes, I check to ensure the current mode is what I expect it to be (sanity check).
I don't believe I need the current mode check statement when transitioning to STOP mode and maybe perhaps STANDBY mode. It is only needed when transitioning to non LPU modes. i.e. DRUN RUN0...RUN3.
Thank you,
You are right, command
while(MC_ME.GS.B.S_CURRENT_MODE != STOP_MODE);
... doesn't make sense because the core is not running in stop mode. And after wake up, current mode is not stop mode anymore.
Regards,
Lukas
Hi Chris,
first, here you can find working example:
Just define #define LPU_Mode 1 ... to select STOP mode.
The problem is that there's no support for low power modes in S32DS debugger. Most likely, debug session will crash when entering or leaving stop mode. It's better to test these low power mode features without debugger or use some advanced ones (like Lauterbach).
Regards,
Lukas