How to make LPTMR works in VLPS mode and wakeup the MCU

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

How to make LPTMR works in VLPS mode and wakeup the MCU

Jump to solution
3,699 Views
KILLERzheng
Contributor IV

Hi NXP:

       I tried that the LPTMR could work in VLPR mode and wake up the MCU, but it did not work in VLPS mode.

        I use the S32k146 and could wakeup the mcu from VLPS with GPIO interrupt, but mcu could not wakeup from VLPS by LPTMR or other FTM.

       Could you please help me?  Thanks!

Tags (3)
0 Kudos
Reply
1 Solution
3,558 Views
namnguyenviet
NXP Employee
NXP Employee

Hello @KILLERzheng 

PFA the fixed project. I simplified the code and tested on S32K146 EVB. The VLPS should be entered after pushing SW2 button, and after about 10 seconds the application exits the VLPS mode by an interrupt from LPTMR. Blue LED will be turned off during VLPS, then turned on after exit VLPS.

Best Regards,

Nam

View solution in original post

0 Kudos
Reply
12 Replies
3,485 Views
Jack527
Contributor I

I use LPTMR module can work in VLPS with LPO clock, but don't leave VLPS; I want to use test IO change in LVPS, if has IO change goto wakeup , but don't leave VLPS, how to from VLPS to RUN ? 

0 Kudos
Reply
3,468 Views
namnguyenviet
NXP Employee
NXP Employee

Hello,

If i understand your issue correctly, then it looks like you're enabling sleep-on exit. Try to disable it and see whether if helps. Other than that, please create another thread.

Best Regards,

Nam

0 Kudos
Reply
3,449 Views
Jack527
Contributor I

Hello

       when IO port change , I need reset system , or else don't leave VLPS mode, I want to from VLPS to RUN mode; now don't goto run mode;

0 Kudos
Reply
3,451 Views
Jack527
Contributor I

Hello

       Can leave VLPS mode, but need reset system, I want to from VLPS to RUN mode; don't goto run mode;

0 Kudos
Reply
3,406 Views
namnguyenviet
NXP Employee
NXP Employee

Hello,

To be honest I don't really understand your request. I think you can contact to our local FAE and share your request by Chinese.

Thank you,

Nam

0 Kudos
Reply
3,559 Views
namnguyenviet
NXP Employee
NXP Employee

Hello @KILLERzheng 

PFA the fixed project. I simplified the code and tested on S32K146 EVB. The VLPS should be entered after pushing SW2 button, and after about 10 seconds the application exits the VLPS mode by an interrupt from LPTMR. Blue LED will be turned off during VLPS, then turned on after exit VLPS.

Best Regards,

Nam

0 Kudos
Reply
3,541 Views
KILLERzheng
Contributor IV

I tried the project you proved, and test it on my own board. I find that when mcu goes into VLPS, the current comsumption is 2.3mA 24V.  I do think the power comsumption is too high to VLPS mode, because I test the VLPS in my own project that the current comsumption is 0.95mA 24V 

KILLERzheng_0-1678870823544.png

 

0 Kudos
Reply
3,528 Views
namnguyenviet
NXP Employee
NXP Employee

Hello @KILLERzheng 

With the shared app, I measured the power consumption with EVB board during VLPS. It's around 0.05 mA @12V. See attachment.

Can  you verify with the EVB board?

Best Regards,

Nam

 

0 Kudos
Reply
3,679 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

the LPTMR module can work in VLPS but it needs the SIRC clock source to be running in VLPS.
Of course, the functional clock of LPTMR must be SIRC.

You can refer to below example; LPTMR in VLPS is used to trigger CMP, that wakeups MCU
https://community.nxp.com/docs/DOC-335759

BR, Petr

0 Kudos
Reply
3,675 Views
KILLERzheng
Contributor IV

KILLERzheng_0-1677029808850.png

In the example project, I find the SIRCLPEN = 1 and SIRCSTEN = 1; 

KILLERzheng_1-1677030054690.png

 

However, I develop my project based on S32K1_RTD_1_0_1_D2202_ASR_REL_4_4_REV_0000_20220224 and config the MCAL with EB, and I find that the "SIRC Stop Enable" could not be enabled. So if I run  "Mcu_SetMode(McuModeSettingConf_VLPS)" , the lptmr seems does not work anymore, and the wakeup function does not work, either.  In this case, the power consumption is 0.95mA 24V.

KILLERzheng_2-1677030900897.png

If "IP_SCG->SIRCCSR |= SCG_SIRCCSR_SIRCSTEN(1U)" run before I set mcu mode into VLPS, the wakeup function works but the power consumption is 2.30mA 24V. I thinks the power consumption is too big, even bigger than VLPR mode(1.2mA 24V).

Is there any wrong in my project? 

 

 

 

 

0 Kudos
Reply
3,671 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I do not know your project, so cannot comment.
You can refer to the AN5425, it discusses tips for making low-power measurements.

BR, Petr

0 Kudos
Reply
3,668 Views
KILLERzheng
Contributor IV

Here is my project, could you please help me figure out my default?

0 Kudos
Reply