MPC5746C: STOP Mode

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

MPC5746C: STOP Mode

跳至解决方案
1,834 次查看
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 项奖励
回复
1 解答
1,798 次查看
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

 

在原帖中查看解决方案

3 回复数
1,811 次查看
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 项奖励
回复
1,799 次查看
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,822 次查看
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 项奖励
回复