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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

8,470 次查看
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 项奖励
回复
36 回复数

3,558 次查看
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 项奖励
回复

3,555 次查看
ananan
Contributor III

ananan_0-1638268138616.png

why init three clocks?

 

0 项奖励
回复

3,556 次查看
ananan
Contributor III

I have send MCAL to your email!

0 项奖励
回复

3,557 次查看
ananan
Contributor III

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

0 项奖励
回复

3,541 次查看
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 项奖励
回复

3,537 次查看
ananan
Contributor III

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

0 项奖励
回复

3,522 次查看
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 项奖励
回复

3,518 次查看
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 项奖励
回复

3,519 次查看
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 项奖励
回复

3,494 次查看
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 项奖励
回复

3,474 次查看
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 项奖励
回复

3,481 次查看
ananan
Contributor III

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

0 项奖励
回复

3,621 次查看
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 项奖励
回复

3,658 次查看
ananan
Contributor III
0 项奖励
回复

3,612 次查看
mysteryli
Contributor II

哈罗老哥

0 项奖励
回复

3,580 次查看
ananan
Contributor III

谁?

0 项奖励
回复