At present, s32K148 enters VLPS mode from RUN mode, and the test circuit board current changes from 120mA to 9mA. It feels that the circuit board has entered VLPS mode, and the WFI command is executed. During the simulation, the following WFI command is not executed.
Then, I configured the Icu module and added the wake source and Sleep mode of Icu and EcuM in davinci Config software. The INTERRUPTION of THE Icu was working, but the Icu pin was triggered externally after Sleep, but the test current did not respond
The following figure shows the register values when entering VLPS
Now I don't know how to wake up MCU. I hope experienced experts can help me!
Hello @ananan ,
Could you please share your configuration(Mcu, Port, ICu .epc files) and also the MCAL version(which you are using) with me for checking this case.
I would like to share with you the example(enter and exit VLPS mode) in attached file.
Best regards,
Hung
Hello @ananan ,
I have check your configuration and I can create a simple project(with your configuration and also the MCAL version 4.3 RTM 1.0.1) and run normally with this configuration. I just send it to your email.
For your question why we need three clock init, the answer is because this example use 4.2 RTM 1.0.3 version(Please see the https://community.nxp.com/t5/S32K/MCU-Setting-issue-on-S32K14X-MCAL4-2-RTM-1-0-4-about-quot-Clock/td... for more information).
Best regards,
Hung
This project is not created from S32DS so you cannot add it to S32DS. This project can be compile with make file.
- If you want to compile please update the paths in the file launch.bat then run the
+ "launch.bat TOOLCHAIN=iar" (for IAR compiler)
+ "launch.bat TOOLCHAIN=ghs" (for GreenHill compiler)
+ "launch.bat TOOLCHAIN=linaro" (for GCC compiler)
Anyway, we still can debut this project with S32DS by loading the ELF file. Please see below picture for more information.
When I downloaded your ELF file, MCU was locked and could not be used again in my own program, jlink could not be linked to MCU, but now the problem has been solved, but I don't know what caused it
Thank you very much, but I still have a question. In your code, after the program is initialized, it enters while, and then keeps executing sleep mode, and triggers PTB17, how can you prove that the MCU is awakened
You can set a breakpoint at the Icu_SetMode(ICU_MODE_SLEEP); then run the code. After that, the program will not hit the Icu_SetMode(ICU_MODE_SLEEP); (because the MCU is in VLPS mode) until you push the wakeup pin.
I'm making a little progress on this problem. Now I've built a project that doesn't have a Freertos system, and then the sleep and wake up of the MCU is working fine. The system I debugged before is equipped with freertos system, which WAS ignored before. I feel that it is now Freertos system that affects this problem. How should the Freertos system deal with the sleep and wake up process of MCU