English
Language : 

MC68HC908RK2 Datasheet, PDF (69/158 Pages) Motorola, Inc – Microcontroller Unit
Usage Notes
The switch automatically selects ICLK during reset. When the clock monitor is on (CMON is set) and it
determines one of the clock sources is inactive (as indicated by the IOFF or EOFF signals), the circuit is
forced to select the active clock. There are no clocks for the inactive side of the synchronizer to properly
operate, so that side is forced deselected. However, the active side will not be selected until one to two
clock cycles after the IOFF or EOFF signal transitions.
6.4 Usage Notes
The ICG has several features which can provide protection to the microcontroller if properly used. There
are other features which can greatly simplify usage of the ICG if certain techniques are employed. This
section will describe several possible ways to use the ICG and its features. These techniques are not the
only ways to use the ICG, and may not be optimum for all environments. In any case, these techniques
should be used only as a template, and the user should modify them according to the application’s
requirements.
These notes include:
• Switching clock sources
• Enabling the clock monitor
• Using clock monitor interrupts
• Quantization error in DCO output
• Switching internal clock frequencies
• Nominal frequency settling time
• Improving frequency settling time
• Trimming frequency
6.4.1 Switching Clock Sources
Switching from one clock source to another requires both clock sources to be enabled and stable. A
simple flow requires:
1. Enable desired clock source
2. Wait for it to become stable
3. Switch clocks
4. Disable previous clock source
The key point to remember in this flow is that the clock source cannot be switched (CS cannot be written)
unless the desired clock is on and stable.
A short assembly code example of how to employ this flow is shown in Figure 6-8. This code is for
illustrative purposes only and does not represent valid syntax for any particular assembler.
MC68HC908RK2 Data Sheet, Rev. 5.1
Freescale Semiconductor
69