S32K312-ResetReason is Wakeup when reset from StandBy

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

S32K312-ResetReason is Wakeup when reset from StandBy

跳至解决方案
2,721 次查看
Simon-Liu
Contributor V

Hello

This phenomenon was discovered during testing: after entering StandBy, a Reset occurred (by pulling the Reset Pin low). The ResetReason read after the reset was Wakeup, but in normal RUN mode, the Reset Pin was read low after the reset. The ResetReason taken is an external Reset.
may I ask if this is normal?

 

BestRegards,

Simon

0 项奖励
回复
1 解答
2,681 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Simon-Liu,

I understand that by WAKEUP_REASON you mean MODE_STAT[PREV_MODE = 1] the previous mode was standby.

However, when F_EXT occurs during the Standby mode, the RDSS register is set.

danielmartynek_0-1697205040669.png

In this case, we should ignore the state of MODE_STAT[PREV_MODE].

My tests shows that MC_RRGM_FES[F_EXR] is set when an external reset_b reset occurs during the Standby mode.

 

Regards,

Daniel

在原帖中查看解决方案

8 回复数
2,698 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Simon-Liu,

What is the content of the DES and FES registers after the wakeup via the reset_b pin?

You should get DES[F_POR] instead of FES[E_EXT] if the POR_WDG is enabled, and the reset_b pin is driven LOW for more than 25ms (default timeout).

Refer to the RM, Chapter 34 Power-on Reset Watchdog (POR_WDG).

Can you try with the POR_WDG disabled?

IP_DCM_GPR->DCMRWP1 |= 0x00000100;

 

Regards,

Daniel

 

2,689 次查看
Simon-Liu
Contributor V

Hello @danielmartynek 

Thank you for your reply.

After testing, whether Disable POR_WDG only affects one situation. It is the case of pulling down the reset_b pin for more than 25ms in StandBy mode. Here are the results of my tests:

1.When DCMRWP1 is not set to make POR_WDG Disable:
  In StandByMode
    reset_b pin is driven LOW for less than 25ms:
      ResetReason:WAKEUP_REASON
      FRET:0x0000000F
      DRET:0x0000000F
    reset_b pin is driven LOW for more than 25ms:
      ResetReason:POWER_ON_RESET
      FRET:0x0000000F
      DRET:0x0000000F

  In Normal Mode
    reset_b pin is driven LOW for less than 25ms:
      ResetReason:F_EXR_RESET
      FRET:0x0000000F
      DRET:0x0000000F
    reset_b pin is driven LOW for more than 25ms:
      ResetReason:F_EXR_RESET
      FRET:0x0000000F
      DRET:0x0000000F

2.When setting DCMRWP1 to make POR_WDG Disable:
  In StandByMode:
    reset_b pin is driven LOW for less than 25ms:
      ResetReason:WAKEUP_REASON
      FRET:0x0000000F
      DRET:0x0000000F
    reset_b pin is driven LOW for more than 25ms:
      ResetReason:WAKEUP_REASON
      FRET:0x0000000F
      DRET:0x0000000F
  In Normal Mode
    reset_b pin is driven LOW for less than 25ms:
      ResetReason:F_EXR_RESET
      FRET:0x0000000F
      DRET:0x0000000F
    reset_b pin is driven LOW for more than 25ms:
      ResetReason:F_EXR_RESET
      FRET:0x0000000F
      DRET:0x0000000F

 

BestRegards, 

Simon

 

0 项奖励
回复
2,682 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Simon-Liu,

I understand that by WAKEUP_REASON you mean MODE_STAT[PREV_MODE = 1] the previous mode was standby.

However, when F_EXT occurs during the Standby mode, the RDSS register is set.

danielmartynek_0-1697205040669.png

In this case, we should ignore the state of MODE_STAT[PREV_MODE].

My tests shows that MC_RRGM_FES[F_EXR] is set when an external reset_b reset occurs during the Standby mode.

 

Regards,

Daniel

2,651 次查看
Simon-Liu
Contributor V

Hi @danielmartynek 

I use the Power_Ip_GetResetReason interface to read the reset reason. In the interface, I found that when the return value of the function Call_Power_Ip_MC_RGM_ResetDuringStandby is not 0, the reset reason is set to WAKEUP. The return value of the Call_Power_Ip_MC_RGM_ResetDuringStandby function is determined based on the value of the RDSS register.

Based on the above code logic, can it be understood that if a reset occurs during Sleep, the reset reason read using the interface Power_Ip_GetResetReason is WAKEUP?

 

BestRegards,

Simon

0 项奖励
回复
2,633 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Simon-Liu,

Yes, that is correct.

The driver reads the RDSS register, and if any of the bits is set, the driver considers the reset to be a wakup event.

danielmartynek_0-1697632125485.png

 

Regards,

Daniel

 

2,620 次查看
Simon-Liu
Contributor V

Hi @danielmartynek 

Thank you for your answer, there is one more thing I want to confirm:
If POR_WDG is Enable, F_POR is set after the 25ms timeout; if the timeout time of 25ms is not reached, F_EXR is set.
If POR_WDG is Disable, there is no 25ms timeout limit, right?


In addition, according to the description in Chapter 34, this timeout period of 25ms is for the stuck situation that occurs during Reset and StandBy Sequence. Does this refer to the stuck situation that occurs during the execution of entering/exiting StadnBy and Reset? Will it also get stuck after entering StangBy mode?

 

BestRegards,

Simon

0 项奖励
回复
2,612 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Simon,

Yes, if POR_WDG is Enabled, F_POR is set after the 25ms timeout; if the timeout time of 25ms is not reached, F_EXR is set.

Yes, if POR_WDG is Disabled, there is no 25ms timeout.

The POR_WDOG works for reset sequences (enabled by default) and for Standby entry / exit sequences (desabled by default). If enabled, it will prevent scenarios where the MCU could get stuck, the MCU recovers through the power-on reset sequence.

 

Regards,

Daniel

 

 

2,598 次查看
Simon-Liu
Contributor V

Hi @danielmartynek 

Thank you for your reply.

 

BestRegards

Simon

0 项奖励
回复