English
Language : 

K60P100M100SF2RM Datasheet, PDF (560/1809 Pages) Freescale Semiconductor, Inc – K60 Sub-Family Reference Manual
Initialization / Application Information
Before the ATM can be enabled, the ATM expected count needs to get derived and stored
into the ATCV register. The ATCV expected count is derived based on the required
target Internal Reference Clock (IRC) frequency, the frequency of the external reference
clock, and using the following formula:
ATCV
• Fr = Target Internal Reference Clock (IRC) Trimmed Frequency
• Fe = External Clock Frequency
If the auto trim is being performed on the 4 MHz IRC, the calculated expected count
value must be multiplied by 128 before storing it in the ATCV register. Therefore, the
ATCV Expected Count Value for trimming the 4 MHz IRC is calculated using the
following formula.
(128)
24.5 Initialization / Application Information
This section describes how to initialize and configure the MCG module in an application.
The following sections include examples on how to initialize the MCG and properly
switch between the various available modes.
24.5.1 MCG Module Initialization Sequence
The MCG comes out of reset configured for FEI mode. The internal reference will
stabilize in tirefsts microseconds before the FLL can acquire lock. As soon as the internal
reference is stable, the FLL will acquire lock in tfll_acquire milliseconds.
24.5.1.1 Initializing the MCG
Because the MCG comes out of reset in FEI mode, the only MCG modes that can be
directly switched to upon reset are FEE, FBE, and FBI modes (see Figure 24-12).
Reaching any of the other modes requires first configuring the MCG for one of these
three intermediate modes. Care must be taken to check relevant status bits in the MCG
status register reflecting all configuration changes within each mode.
To change from FEI mode to FEE or FBE modes, follow this procedure:
1. Enable the external clock source by setting the appropriate bits in C2 register.
K60 Sub-Family Reference Manual, Rev. 6, Nov 2011
560
Freescale Semiconductor, Inc.