Clock Functions
Limp-Home and Fast STOP Recovery modes
68HC912DG128 Rev 1.0
MOTOROLA
Clock Functions
147
9-clock
LHOME flag is cleared. This also sets the limp-home interrupt flag. Upon
leaving limp-home mode, BCSP and MCS are restored to their values
before the clock loss, and XCLK, BCLK and MCLK return to their
previous frequencies. If AUTO and BCSP were set before the clock loss,
the sysclk ramps-up and the PLL locks at the previously selected
frequency. To prevent PLL operation when the external clock frequency
comes back, the software should clear the BCSP bit while running in
limp-home mode.
The two shaded regions
A
and
B
in
Figure 15
present a risk of code
runaway if the MCU is clocked by EXTALi and the PLL is not used.
If the MCU is clocked by PLL, the risk of code runaway is very low
or nonexistent as the transition from PLL to limp-home and vice
versa is smooth.
In the region
A
, there is a delay between the loss of clock and its
detection by the clock monitor. When the EXTALi clock signal is
disturbed, the clock generation circuitry may receive improper signal and
it will feed the CPU with incorrect clocks. This may lead to a code
runaway.
In the region
B
, as the 13-stage counter is free running, the count of
4096 may be reached when amplitude of the EXTALi clock is not
stabilized. In this case an improper EXTALi is sent to the clock
generation circuitry when the limp-home mode is exited. This may cause
a code runaway.
NOTE:
The COP watch dog should always be enabled in order to reset the MCU
in case of a code runaway situation.
No Clock at
Power-On Reset
When VDDPLL supply voltage is at VDD level, any reset sets the Clock
Monitor Enable bit (CME), the PLLON bit and clears the NOLHM bit.
Therefore, if the MCU is powered up without an external clock,
limp-home mode is activated.
During a normal power up sequence, after the POR pulse falling edge,
the VCO supplies the limp-home clock frequency to the 13-stage
counter, as BCSP output is forced high and MCS is forced low. XCLK,
BCLK and MCLK are forced to be PCLK, which is supplied by the VCO.