my project is based on MCAL 4.4 RTD 1.0.0 of S32k146 with FreeRTOS, before I try to sleep, I deinit all the modules except ICU and then use Mcu_SetMode(McuModeSettingConf_VLPS) to make mcu sleep.
it seems that the mcu is into VLPS which I could not debug via PE, but it could not wake up either.
Is there any step I missed or configuration I configed wrong?
已解决! 转到解答。
Hi @KILLERzheng,
Thank you for all the information.
I think the issue is in the Sleep-on-exit mode.
If the mode is enabled, the MCU goes to VLPS again after the ISR is complete.
Please try with the mode disabled.
Also, to get lower consumption, disconnect the debugger and power-cycle the MCU.
Thanks,
BR, Daniel
Hi @KILLERzheng,
Does the GPIO interrupt work in RUN mode?
Can you measure the power consumption at VDD or BUS_CLK at the CLKOUT pin to confirm the VLPS mode?
Can you halt the MCU just before it enters the VLPS mode and check whether the interrups are not masked globaly and that NVIC is configured correctly?
Please make sure the MCU does not enter the sleep-on-exit VLPS mode?
Thanks,
BR, Daniel
Does the GPIO interrupt work in RUN mode?
ans: yes, when i set the port B0 low, the ISR works
Can you measure the power consumption at VDD or BUS_CLK at the CLKOUT pin to confirm the VLPS mode?
ans: the consumption before VLPS is >25mA, after set_McuMode, it is 10mA (but it is still high,which i measure that the consumption of MCU[without any software is 4mA])
Can you halt the MCU just before it enters the VLPS mode and check whether the interrups are not masked globaly and that NVIC is configured correctly?
ans: how to do it?
Please make sure the MCU does not enter the sleep-on-exit VLPS mode?
ans: MCU should not enter the sleep-on-exit ? but the RM said it should be, and i do configured that "sleep-on-exit" in MCU as below.
I find that after the set_McuMode(vlps), I set the PortB0 low, the PORT_CI_ICU_IP_B_EXT_IRQ_ISR works and it could turn on the light as well as the mcu mode is run. But I do not know how to make the program re_init all the modules. Or should I reset the mcu manually?
Hi @KILLERzheng,
Thank you for all the information.
I think the issue is in the Sleep-on-exit mode.
If the mode is enabled, the MCU goes to VLPS again after the ISR is complete.
Please try with the mode disabled.
Also, to get lower consumption, disconnect the debugger and power-cycle the MCU.
Thanks,
BR, Daniel