I'm trying to get stop mode working with the s12zvm. We are waking via the LIN bus. The design uses the internal clock. I'm able to sleep and wake, but when I wake my clocks are running extremely slow (seems like 12.5MHz down to something like 18KHz). I've tried reinitializing the CPMU subsystem and waiting for CPMUIFLG_LOCK, but my clocks are still slow. What am I missing? Since all the clocks are killed by STOP, is there a reinitialization sequence I'm supposed to go through after waking up via LIN? Thanks
There is no reinitialization sequence.
PLLSEL is set automatically, when it enters Stop mode.
Out of Stop mode, it runs on PLLCLK (PEI mode) and tries to lock. (Figure 8-42, RM)
So, it hangs waiting for CPMUIFLG_LOCK?
What is the bus clock frequency before Stop mode?
Can you share the PLL configuration code?