S32K148 Can not wakeup to RUN mode from VLPS mode config in MCAL EB tresos and davinci software

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

S32K148 Can not wakeup to RUN mode from VLPS mode config in MCAL EB tresos and davinci software

8,473 Views
ananan
Contributor III

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 VLPSananan_1-1637725260830.png

Now I don't know how to wake up MCU. I hope experienced experts can help me!

0 Kudos
Reply
36 Replies

3,561 Views
hungnguyenphi
NXP Employee
NXP Employee

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

0 Kudos
Reply

3,558 Views
ananan
Contributor III

ananan_0-1638268138616.png

why init three clocks?

 

0 Kudos
Reply

3,559 Views
ananan
Contributor III

I have send MCAL to your email!

0 Kudos
Reply

3,560 Views
ananan
Contributor III

I will send MCAL to your email hung.nguyen.phi@nxp.com,S32K14X_MCAL4_3_RTM_P2_1_0_1

0 Kudos
Reply

3,544 Views
hungnguyenphi
NXP Employee
NXP Employee

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

0 Kudos
Reply

3,540 Views
ananan
Contributor III

thank you very much ! but how to open you project with s32DS ? I want to download to my mcu.

0 Kudos
Reply

3,525 Views
hungnguyenphi
NXP Employee
NXP Employee

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.

hungnguyenphi_0-1638335106189.png

 

0 Kudos
Reply

3,521 Views
ananan
Contributor III

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

0 Kudos
Reply

3,522 Views
ananan
Contributor III

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

0 Kudos
Reply

3,497 Views
hungnguyenphi
NXP Employee
NXP Employee

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.

0 Kudos
Reply

3,477 Views
ananan
Contributor III

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

0 Kudos
Reply

3,484 Views
ananan
Contributor III

But I can't set breakpoints because I can't simulate debugging your code with the S32KDS

0 Kudos
Reply

3,624 Views
ananan
Contributor III

OK,I get it, thank you very much!

I followed the code you showed me yesterday, but after sleep, the code that triggered the external pin, the ICU interrupt callback function was not executed

0 Kudos
Reply

3,661 Views
ananan
Contributor III
0 Kudos
Reply

3,615 Views
mysteryli
Contributor II

哈罗老哥

0 Kudos
Reply

3,583 Views
ananan
Contributor III

谁?

0 Kudos
Reply