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