S32K PowerOn Reason

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

S32K PowerOn Reason

Jump to solution
572 Views
Simon-Liu
Contributor IV

Hello

I need to know what causes the main function to start every time, such as the first power-on, wakeup, reset, etc. Where can I get this information? What needs to be configured in DS, or which register to read?

(The chip I use is S32K312)

Thanks

0 Kudos
1 Solution
545 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @Simon-Liu,

There are MC_RGM[DES], MC_RGM[FES] registers that contain the status of the destructive and functional reset sources.

In addition, on exiting a reset sequence after standby exit, the software must perform a read operation on MC_ME[PREV_MODE] and RDSS register. If any bit of the RDSS register is set, the software must ignore the status reported by MC_ME[PREV_MODE] register otherwise the status of MC_ME[PREV_MODE] register reports the device status. If MC_ME indicates last mode as RESET, then perform a reset exit in software else a standby exit.

If you use the RTD drivers, the Ip_Power driver (Power_Ip.c) has this API: Power_Ip_GetResetReason().

 

Regards,

Daniel

 

View solution in original post

4 Replies
546 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @Simon-Liu,

There are MC_RGM[DES], MC_RGM[FES] registers that contain the status of the destructive and functional reset sources.

In addition, on exiting a reset sequence after standby exit, the software must perform a read operation on MC_ME[PREV_MODE] and RDSS register. If any bit of the RDSS register is set, the software must ignore the status reported by MC_ME[PREV_MODE] register otherwise the status of MC_ME[PREV_MODE] register reports the device status. If MC_ME indicates last mode as RESET, then perform a reset exit in software else a standby exit.

If you use the RTD drivers, the Ip_Power driver (Power_Ip.c) has this API: Power_Ip_GetResetReason().

 

Regards,

Daniel

 

542 Views
Simon-Liu
Contributor IV

Hi @danielmartynek 

Thank you for your answer.

I noticed that in the Power configuration of DS, there are some values in the picture below. Calling the Power_Ip_GetResetReason() interface returns these values, right?

SimonLiu_0-1686733982558.jpeg

Regards,

Simon

0 Kudos
537 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Yes, there is this enumeration (Power_Ip_Specific.h)

danielmartynek_0-1686735560033.png

 

BR, Daniel

535 Views
Simon-Liu
Contributor IV

Thank you for your answer.

BestRegards,

Simon

0 Kudos