s32k3 exit from standby mode

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

s32k3 exit from standby mode

跳至解决方案
765 次查看
hajianik
Senior Contributor I

Hi,

Hi,

I'm  using Q_100 eval board for the projects targeted for S32k310/11.

I'm able to enter/exit stand by mode both using RTI and pin WAKE UP. I SAY THAT BECAUSE OF THE CURRENT DROP IN RUN VS STANDBY MODE.

I also have a debug_printf custom made for my project.

ONCE I WAKE UP, THE DEBUGGER (P&E MULTI LINK) CRASHES BUT I COULD USE THE PRINTF TO REPORT THE MC_RGM_ DES/FES:

DEBUG_Printf(Print_buf,"the value is %X %X\r\n", IP_MC_RGM->DES,IP_MC_RGM->FES) 

MC-RGM_DES IS 1 AND FES IS 0. 

The value of 1 for MC-RGM_DES indicates POWER UP RESET where I was expecting to see 0.

I've also notice that this bit is used in startup code not to clear the RAM location for the RAM retention.

Lastly when I call Power_Ip_GetResetReason(); the device triggers a bus fault which is promoted to Hard Fault:

Clock_Ip_StatusType clockStatus;

/*Initialize the clocks*/

clockStatus=Clock_Ip_Init(&Clock_Ip_aClockConfig[0]);
#if 1
while (clockStatus != CLOCK_IP_SUCCESS)
{
clockStatus = Clock_Ip_Init(&Clock_Ip_aClockConfig[0]);
}
#endif
Power_Ip_Init(&Power_Ip_HwIPsConfigPB);
Power_Ip_GetResetReason();

This code is tightly base on the EXAMPLES PROVIDE BY NXP.

I'm impatiently waiting for your response.

Regards,

Koorosh Hajiani 

0 项奖励
1 解答
695 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I tried your project and it has some SRAM init issue or similar. It goes away after I added S32K310 into asm preprocessor setting.

PetrS_0-1705579666407.png

Then the project seems to run well as standalone. I uncommented Power_Ip_GetResetReason as well. It is going to standby and wakes up upon timeout or switch pressing. Terminal is showing "the value is 0 0 " still, after wake up too. 
With debugger connected it does not run similarly, but debugging low power apps is always problematic.

BR, Petr

在原帖中查看解决方案

标记 (1)
5 回复数
743 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

if remember well you got some simple working project from us. Do you see same issue for it too?
For your modified one, hard to say, try to share it so we can test.
A POR can be also triggered when multimeter is still connected using auto-ranging function, as mentioned in power management AN note (https://community.nxp.com/t5/S32K-Knowledge-Base/S32K3-Low-Power-Management-AN-and-demos/ta-p/152772....

BR, Petr

0 项奖励
739 次查看
hajianik
Senior Contributor I

I guess I forgot to attach the file

0 项奖励
696 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I tried your project and it has some SRAM init issue or similar. It goes away after I added S32K310 into asm preprocessor setting.

PetrS_0-1705579666407.png

Then the project seems to run well as standalone. I uncommented Power_Ip_GetResetReason as well. It is going to standby and wakes up upon timeout or switch pressing. Terminal is showing "the value is 0 0 " still, after wake up too. 
With debugger connected it does not run similarly, but debugging low power apps is always problematic.

BR, Petr

标记 (1)
688 次查看
hajianik
Senior Contributor I

Thank you PetrS,

So I see the " S32K310" is used in the startup code. It is working as expected.

I don't know is this question needs another thread or I could ask this here.

The question is:

the startup code  checks the PON bit of the DES register. if it is zero ( no POWER ON RESET)it jumps to NO_INIT_STANDBY_REGION, I guess over there it initializes the ram to zero, I could be wrong there. I need to look at the code more carefully . But lets say it does init RAM to zero and this defeat the RAM retention, If it does skip the ZERO loop then that RAM is preserved. and if I need to have the portion of the RAM,I need to modify the linker file

0 项奖励
740 次查看
hajianik
Senior Contributor I

Hi PEtrS,

Thanks for your response,

I'm so happy to see your name to answer this question.

It does not happen on your project when running on Q_100 eval board . I used basically same code and I added in, the RTI wakeup. Both work , RTI is set up for 15 seconds or so.

Same LEDS  setup as yours. I compared the clock config and power config file with yours they are almost identical.

I am not calling Power_Ip_GetResetReason(). if I do I get a Hardfault 

Anyways I've attached the project.

Thank you for your help.

koorosh Hajiani

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0 项奖励