I config S12G128 with PLL and MSCAN.when I dubug by P&E_Multlilink_USB ,s12g128 enter stop mode and bring about "ILLEGAL_BP" like this:
Does it reset?It is normal or what's wrong with it? It is on going run ,but Idonot know where it run?
I config PLL with frequence PLL = 32MHz , BUS = 16MHz,VCO = 32Mhz.
enter full stop mode code:
void Go_Full_StopMode(void)
{
DDRT_DDRT6 = 1;
delay_Mms(20);
CANCTL0_SLPRQ = 1; //sleep mode request ,Wait MSCAN sleep
asm(nop);
while(CANCTL1_SLPAK == 0);
delay_Mms(1);
CPMUCLKS_PSTP = 0; // Oscillator is disabled in Stop Mode (Full Stop Mode)
asm ANDCC #0x7F;
asm(nop);
EnableInterrupts;
asm STOP;
}
#pragma CODE_SEG __NEAR_SEG NON_BANKED
void interrupt 36 CAN_WakeUp(void)
{
// delay_can_Mms(5);
INIT_WAKE_CAN();
CANRFLG_WUPIF = 1;
}
#pragma CODE_SEG DEFAULT
Is there something wrong? I need your advice.
Thank you.
Solved! Go to Solution.
Hello,
The debugger is disconnected when the MCU enters the stop mode.
To verify that the MCU is in the stop mode and wakes up, please use ECLK.
ECLKCTL_NECLK = 0; // Bus clock on PS7.
Bus clock is gated off in the stop mode.
Regards,
Daniel
Hello,
The debugger is disconnected when the MCU enters the stop mode.
To verify that the MCU is in the stop mode and wakes up, please use ECLK.
ECLKCTL_NECLK = 0; // Bus clock on PS7.
Bus clock is gated off in the stop mode.
Regards,
Daniel
Hi,thank you for your help.I still have two questions.
1. MCU enters the stop mode successful. And the power consumption (strom ) reduce reduce from 23.45mA to 6.91mA, it still cannot meet request for a few milliamps. I have close the power of external device,what can I do to reduce MCU's power consumption? adjust PLL or others?
2. I add watchdog function.before MCU enter stop mode ,it work well. But,when MCU wake up from sleep by CAN, it run away,I don't know what happened to it?
Regards,
Shanwen