MPC5746C: STOP Mode

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

MPC5746C: STOP Mode

Jump to solution
1,285 Views
cholland
Contributor V

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.

Registers.png

 

Thank you very much for your support.

 

0 Kudos
1 Solution
1,249 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

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

 

View solution in original post

3 Replies
1,262 Views
cholland
Contributor V

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,

0 Kudos
1,250 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

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

 

1,273 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Chris,

first, here you can find working example:

https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/Example-MPC5748G-Low-power-modes-S32DS-2017-R1/t...

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

 

 

0 Kudos