How to wake up S32k146 from VLPS with LPIT

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

How to wake up S32k146 from VLPS with LPIT

1,883 Views
KILLERzheng
Contributor IV

I could wake up the mcu with GPIO from VLPS.

However, I want to make the MCU wake up regularly from VLPS. I found the LPIT could be available, but I do not know how to configure the MCAL with EB. 

Is there any example which shows this function? 

My RTD version is SW32K1_RTD_4.4_1.0.0_HF01_D2109

Thanks and waiting for your reply!

0 Kudos
Reply
8 Replies

1,836 Views
cuongnguyenphu
NXP Employee
NXP Employee

Hi @KILLERzheng ,
It's needed to config 1 MCU mode setting VLPS besides RUN mode in EB Tresos.

cuongnguyenphu_0-1673260451646.png

 


After that, config 1 timer to wakeup MCU from VLPS. However, I tried to use Lpit but unable to wakeup VLPS, but RTC and LPTMR can wakeup VLPS. I think it 's relating to the errata from UM:

cuongnguyenphu_0-1673260526443.png

 


My example is tested using S32K144, RTD 1.0.1.

0 Kudos
Reply

1,829 Views
KILLERzheng
Contributor IV

KILLERzheng_0-1673489718807.png

KILLERzheng_1-1673489742061.png

 

I did enable the "Allow Very-Low-Power Modes" and disable the "Mcu Enable Sleep On Exit" of VLPS, but I do not know how to config the GPT and use RTC or LPTMR to set the time to wake up the mcu.

Could you please send me the EB project?

0 Kudos
Reply

1,820 Views
cuongnguyenphu
NXP Employee
NXP Employee

You can see my EB Tresos project config in above attachment:

cuongnguyenphu_0-1673497768054.png

 

0 Kudos
Reply

1,817 Views
KILLERzheng
Contributor IV

Thanks and I do find the EB project.

KILLERzheng_0-1673514744983.png

 

But I still could not make the Lptmr wake up the mcu from vlps. Is there anything wrong that I need to deal with?

when the mcu enter VLPS, it seems that the lptmr timer does not work and the counter do not add, so it could not wake up with timeout

0 Kudos
Reply

1,809 Views
cuongnguyenphu
NXP Employee
NXP Employee

I think you should remove the Mcu_SetMode at the line 43 and debug first, to check that whether the LPTMR worked correctly at your side, and the LPTMR notification can toggle LPTMR_Notification flag?
Then, you can debug to see where the pointer stuck in when running with Mcu_SetMode(VLPS)
Let's leave your result here so I can follow

0 Kudos
Reply

1,796 Views
KILLERzheng
Contributor IV

I use S32k146 64pin mcu and modify the EB project you provide to fit my own board. When it run the Mcu_SetMode(VLPS) , it could not wakeup again either. Does this function need other hardware besides MCU? The hardware schematic diagram as bellow, please help me with this problem. Thanks!!

KILLERzheng_0-1673591108707.png

 

0 Kudos
Reply

1,806 Views
KILLERzheng
Contributor IV

 when I remove the Mcu_SetMode(VLPS), the LPTMR_Notification does toggled and after 2.5s the LPTMR_Notification = 1.

I debug the program with JLINK, and keep the line 43(Mcu_SetMode(VLPS)), the mcu could not sleep ( or it is wake up by debuger) and continue to run line 44. So I do not know how to do that "debug to see where the pointer stuck in when running with Mcu_SetMode(VLPS)".

0 Kudos
Reply

1,791 Views
cuongnguyenphu
NXP Employee
NXP Employee

So in case to keep line 43(Mcu_SetMode(VLPS)), The LPTMR notification can be triggered or not?
I checked documents and your config, there's nothing seems to be wrong. 
Can you check the wakeup source RTC also? is it able to wakeup Mcu by RTC?

0 Kudos
Reply