![NXP Semiconductors freescale KV4 Series Reference Manual Download Page 577](http://html1.mh-extra.com/html/nxp-semiconductors/freescale-kv4-series/freescale-kv4-series_reference-manual_1721789577.webp)
30.5.3.2 Example 2: Moving from PEE to BLPI mode: MCGOUTCLK
frequency =32 kHz
In this example, the MCG will move through the proper operational modes from PEE
mode with a 16 MHz crystal configured for a 120 MHz MCGOUTCLK frequency (see
previous example) to BLPI mode with a 32 kHz MCGOUTCLK frequency. First, the
code sequence will be described. Then there is a flowchart that illustrates the sequence.
1. First, PEE must transition to PBE mode:
a. C1 = 0x40
• C1[CLKS] set to 2'b10 to switch the system clock source to the external
reference clock.
b. Loop until S[CLKST] are 2'b10, indicating that the external reference clock is
selected to feed MCGOUTCLK.
2. Then, PBE must transition either directly to FBE mode or first through BLPE mode
and then to FBE mode:
a. BLPE: If a transition through BLPE mode is desired, first set C2[LP] to 1.
b. BLPE/FBE: C6 = 0x00
• C6[PLLS] clear to 0 to select the FLL. At this time, with C1[FRDIV] value
of 3'b100, the FLL divider is set to 512, resulting in a reference frequency of
16 MHz / 512 = 31.25 kHz. If C1[FRDIV] was not previously set to 3'b100
(necessary to achieve required 31.25–39.06 kHz FLL reference frequency
with an 16 MHz external source frequency), it must be changed prior to
clearing C6[PLLS] bit. In BLPE mode,changing this bit only prepares the
MCG for FLL usage in FBE mode. With C6[PLLS] = 0, the C6[VDIV]
value does not matter.
c. BLPE: If transitioning through BLPE mode, clear C2[LP] to 0 here to switch to
FBE mode.
d. FBE: Loop until S[PLLST] is cleared, indicating that the current source for the
PLLS clock is the FLL.
3. Next, FBE mode transitions into FBI mode:
a. C1 = 0x64
• C1[CLKS] set to 2'b01 to switch the system clock to the internal reference
clock.
Chapter 30 Multipurpose Clock Generator (MCG)
KV4x Reference Manual, Rev. 2, 02/2015
Freescale Semiconductor, Inc.
Preliminary
577
Summary of Contents for freescale KV4 Series
Page 2: ...KV4x Reference Manual Rev 2 02 2015 2 Preliminary Freescale Semiconductor Inc...
Page 60: ...KV4x Reference Manual Rev 2 02 2015 60 Preliminary Freescale Semiconductor Inc...
Page 128: ...Debug Security KV4x Reference Manual Rev 2 02 2015 128 Preliminary Freescale Semiconductor Inc...
Page 138: ...Boot KV4x Reference Manual Rev 2 02 2015 138 Preliminary Freescale Semiconductor Inc...
Page 1358: ...KV4x Reference Manual Rev 2 02 2015 1358 Preliminary Freescale Semiconductor Inc...