S32K312 Wkup

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

S32K312 Wkup

Jump to solution
1,902 Views
ZZZZZJH
Contributor II

Hello, supporters of NXP. I have configured a set of code using S32K312 based on LLD. Now I want to integrate the WKUP function, but I have encountered some problems. If I do not add the following code in the code:

Power_Ip_Init(&Power_Ip_HwIPsConfigPB);
Power_Ip_GetResetReason();
Power_Ip_SetMode(&Power_Ip_aModeConfigPB[0]);
 

the program will enter the standby mode, but after waking up, it will run abnormally. If I add the following code:

Power_Ip_Init(&Power_Ip_HwIPsConfigPB);
Power_Ip_GetResetReason();
Power_Ip_SetMode(&Power_Ip_aModeConfigPB[0]);
 

it will enter a hardware error when I call other peripheral interfaces such as ADC, PWM to obtain data.such as Adc_Sar_Ip_GetConvData,Emios_Icu_Ip_StartSignalMeasurement

If I do not call the peripheral interfaces, the program can normally enter the Standby mode and wake up. What is the reason for this? What is the direction for troubleshooting?I'm sorry that my code cannot be shared.I look forward to your reply.

Tags (1)
0 Kudos
Reply
1 Solution
1,890 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @ZZZZZJH,

I'm not sure what is the difference between the first and second code snipped, but it sounds like you are missing some configuration in the POWER driver. If a component is not enabled, trying to initialize it or use it will result in a hardfault.

For example, in the RUN mode, confirm if the ADC and PWM instances are enabled in the McuPeripheral tab:

Julin_AragnM_0-1754409469175.png

Also are you using FastStandby or normal Standby exit? If fast is used, you must jump to Reset Handler after a wake up to initialize the MCU correctly.

There are also some example configurations for low power in the following community posts:

Best regards,
Julián

View solution in original post

0 Kudos
Reply
3 Replies
1,891 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @ZZZZZJH,

I'm not sure what is the difference between the first and second code snipped, but it sounds like you are missing some configuration in the POWER driver. If a component is not enabled, trying to initialize it or use it will result in a hardfault.

For example, in the RUN mode, confirm if the ADC and PWM instances are enabled in the McuPeripheral tab:

Julin_AragnM_0-1754409469175.png

Also are you using FastStandby or normal Standby exit? If fast is used, you must jump to Reset Handler after a wake up to initialize the MCU correctly.

There are also some example configurations for low power in the following community posts:

Best regards,
Julián

0 Kudos
Reply
1,880 Views
ZZZZZJH
Contributor II
Thanks,Julián!The above problem occurred because the McuPeripheral component in my Power was not enabled. This led to a hardware error. The problem has been resolved. I am currently using the normal StandBy mode. May I ask if there are any differences between Fast and Normal?
1,866 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @ZZZZZJH,

Yes, there are some differences, normal standby exit will perform both the HSE & sBAF initialization code and HSE_FW verification, while fast standby exit will bypass to save time. Also, fast standby exit will boot to a user defined address, where user can execute some critical tasks before calling the Reset_Handler and fully initializing the MCU.

Julin_AragnM_0-1754494200655.png

You can find the full details from chapter 41.2 from the S32K3 Reference Manual.

Best regards,
Julián

0 Kudos
Reply