When I debug MC9S12XEP100 with low power mode, the chip can enter the stop mode and weak up from stop mode by SCI interrupt, but the SCI baud rate has changed. I found the relevant datasheet, but I can't find solution.So I want to ask how to solve the SCI baud rate is not normal when the chip wakes up.
This is my code to enter low power mode.
SCI0SR2_AMAP = 1;
SCI0ACR1_RXEDGIE = 1;
CLKSEL_PSTP = 0; // Oscillator is disabled in Stop Mode (Full Stop Mode)
asm ANDCC #0x7F;
This is my code to exit stop mode.
#pragma CODE_SEG __NEAR_SEG NON_BANKED
void interrupt 20 SCI0_ISR(void)
//SCI0ACR1 = 1;
SCI0ACR1_RXEDGIE = 0;
SCI0SR2_AMAP = 0;
SCI0CR2_RIE = 1;
Hopefully someone can give me some advice and solutions.