STANDBY mode entry problem

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

STANDBY mode entry problem

372 Views
snafu
Contributor III

Hello

I have problem with entering STANDBY mode at MPC5606B.
I use following code to switch between modes. Transition into STOP mode or RUNx modes works fine, but when I want to go to STANDBY mode, ME_GS.MTRANS bit is set to 1 (transition ongoing) and never resets to 0.

int halSPCSetRunMode(spc5_runmode_t mode)
{
  /* Starts a transition process.*/
  ME.MCTL.R = SPC5_ME_MCTL_MODE(mode) | SPC5_ME_MCTL_KEY;
  ME.MCTL.R = SPC5_ME_MCTL_MODE(mode) | SPC5_ME_MCTL_KEY_INV;

  while (true) {
    uint32_t r = ME.GS.B.MTRANS;
    if (r == 0) {
        return 1;
    }
  }
}

I have no idea what to look at or what could be the problem. I would be grateful for any help.

Thank you beforehand.

Regards

Pavel

 

0 Kudos
Reply
1 Reply

360 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

usually what prevents entering the STANDBY is active clock on some peripheral. For example CAN, PWM, etc... As this clock will not be aviable in STANDBY it is recommended to deactivate it first and then do mode transition.

Just a blind shot.

Best regards,

Peter

0 Kudos
Reply