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!
Hi @KILLERzheng ,
It's needed to config 1 MCU mode setting VLPS besides RUN mode in EB Tresos.
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:
My example is tested using S32K144, RTD 1.0.1.
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?
You can see my EB Tresos project config in above attachment:
Thanks and I do find the EB project.
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
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
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!!
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)".
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?