AnsweredAssumed Answered

How does the MPC5746C change power mode from STANDBY to DRUN?

Question asked by 泽乾 高 on Mar 11, 2019
Latest reply on Mar 12, 2019 by Peter Vlna

Because my project can not avoid these things as follows:

123

 

My project always go fail into standby and then the API <POWER_SYS_SetMode> returns status.

 

<Dinit all the peripheral >;

<Set wakeup address and wakeup source >;

stSwitchMode = POWER_SYS_SetMode(standby_mode, POWER_MANAGER_POLICY_AGREEMENT);

if(stSwitchMode == STATUS_SUCCESS)

{

   <do something to resume the program>

}

else

{

   mcu_reset();

}

 

However there are two questions.

1. The program has a certain probability to be blocked in there:123

2. The program has a certain probability not blocked but all the peripheral do not work。

It is not useful to init again the clock and the powermode.

 

when  <POWER_SYS_SetMode> returns STATUS_SUCCES :

 

(void)CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_AGREEMENT);
(void)POWER_SYS_SetMode(drun_mode, POWER_MANAGER_POLICY_AGREEMENT);

<Init all the peripheral >;

 

But all the peripheral do not work and the mcu can not go into standby.

 

 

There are two situation that the program do not block and occur error.

1. 

stSwitchMode = POWER_SYS_SetMode(standby_mode, POWER_MANAGER_POLICY_AGREEMENT);

if(stSwitchMode == STATUS_SUCCESS)

{

   mcu_reset();

}

else

{

   mcu_reset();

}

2.enable the watch dog.

 

How can i do to resume the program from standby fail to drun and go into standby once again?

 

 

Outcomes