Hi Peter,
Thanks for your comment. We have duplicated the issue on standalone Ecu.
We have confirmed that even RGM_FBRE is all set to ‘0’, when MCU is stuck in running(reset) state, reset pin still keeps HIGH without any pulse. It seems that this issue is not caused by Functional Reset.
We also found that the key step to duplicate the issue: is to send CAN msg to wakeup Mcu through CanRx pin while Mcu is entering into STANDBY mode.
Please note: There is only one wakeup source for system. CAN module has already been disabled(FREZ=HALT=1) before performing below function.
Detail steps for key function to trigger issue:
1) Prepare to enter LPM(STANDBY) mode.
a. Clear existing WISR[CanRxd] wakeup Flag.
b. MSR[ME]=1; MSR[EE]=0; CPR.B.BPI = 0; PSR[CanRxd]=0; IRER[CanRxd] = 1; WRER[CanRxd] =1; WIFEER[CanRxd]=1
2) Entering into LPM Standby mode via MCAL API: Mcu_SetMode(). Please note LPM transition code is running at Flash.
3) If failed to enter into STANDBY mode, goto Step1.
We found if set IRER[CanRxd] = 0 during step(1.b), it seems that Mcu can works fine without entering into “Running(rest)”. If set IRER[CanRxd] = 1, then we has high rate to encounter the issue.
Now customer has tested periodic wakeup and periodic sleep with more Ecu boards, for one day and night. Ecu with IRER[CanRxd] = 0 works fine.
We noticed that there is a errata e7953. It's too roughly that we can't get any detail info from it. It seems that this is the root cause. We think this errata also apply to STANDBY mode, right? But how to understand "block the mode transition" or "possibly lead to unspecified behavior."? Does it mean: 1) mode transition fail and return to previous mode; 2) core hanging during mode transition; 3) mode transition fail and always stay in transition state flow?
e7953: ME: All peripherals that will be disabled in the target mode must have their
interrupt flags cleared prior to target mode entry
Description: Before entering the target mode, software must ensure that all interrupt flags are cleared for
those peripheral that are programmed to be disabled in the target mode. A pending interrupt
from these peripherals at target mode entry will block the mode transition or possibly lead to
unspecified behavior.
Workaround: For those peripherals that are to be disabled in the target mode the user has 2 options:
1. Mask those peripheral interrupts and clear the peripheral interrupt flags prior to the target
mode request.
2. Through the target mode request ensure that all those peripheral interrupts can be serviced
by the core.
Johnny