MCU Internal Clock Generator (ICG)
MC1321x Reference Manual, Rev. 1.6
Freescale Semiconductor
14-15
14.4.3
Example #2: External Crystal = 4 MHz, Bus Frequency = 20 MHz
In this example, the FLL will be used (in FEE Mode) to multiply the external 4 MHz oscillator up to
40-MHz to achieve 20 MHz bus frequency.
After the MCU is released from reset, the ICG is in Self-clocked Mode (SCM) and supplies approximately
8 MHz on ICGOUT which corresponds to a 4 MHz bus frequency (f
Bus
).
During reset initialization software, the clock scheme will be set to FLL engaged, external (FEE). So
f
ICGOUT
= f
ext
* P * N / R ; P = 1, f
ext
= 4.00 MHz
Eqn. 14-3
Solving for N / R gives:
N / R = 40 MHz /(4 MHz * 1) = 10 ; We can choose N = 10 and R = 1
Eqn. 14-4
The values needed in each register to set up the desired operation are:
ICGC1 = $78 (%01111000)
Bit 7
HGO
0
Configures oscillator for low-power operation
Bit 6
RANGE
1
Configures oscillator for high-frequency range; FLL prescale factor is 1
Bit 5
REFS
1
Requests an oscillator
Bits 4:3 CLKS
11
FLL engaged, external reference clock mode
Bit 2
OSCSTEN 0
Disables the oscillator in stop modes
Bit 1
LOCD
0
Loss-of-clock detection enabled
Bit 0
0
Unimplemented or reserved, always reads zero
ICGC2 = $30 (%00110000)
Bit 7
LOLRE
0
Generates an interrupt request on loss of lock
Bit 6:4 MFD
011
Sets the MFD multiplication factor to 10
Bit 3
LOCRE
0
Generates an interrupt request on loss of clock
Bit 2:0 RFD
000
Sets the RFD division factor to
÷
1
ICGS1 = $xx
This is read only except for clearing interrupt flag
ICGS2 = $xx
This is read only. Should read DCOS before performing any time critical tasks
ICGFLTLU/L = $xx
Not used in this example
ICGTRM
Not used in this example
Содержание freescale semiconductor MC13211
Страница 40: ...MC1321x Pins and Connections MC1321x Reference Manual Rev 1 6 2 6 Freescale Semiconductor...
Страница 100: ...MC1321x Serial Peripheral Interface SPI MC1321x Reference Manual Rev 1 6 4 24 Freescale Semiconductor...
Страница 166: ...Modem Modes of Operation MC1321x Reference Manual Rev 1 6 7 22 Freescale Semiconductor...
Страница 172: ...Modem Interrupt Description MC1321x Reference Manual Rev 1 6 8 6 Freescale Semiconductor...
Страница 186: ...MCU Modes of Operation MC1321x Reference Manual Rev 1 6 10 8 Freescale Semiconductor...
Страница 208: ...MCU Memory MC1321x Reference Manual Rev 1 6 11 22 Freescale Semiconductor...
Страница 244: ...MCU Parallel Input Output MC1321x Reference Manual Rev 1 6 13 20 Freescale Semiconductor...
Страница 288: ...MCU Central Processor Unit CPU MC1321x Reference Manual Rev 1 6 15 20 Freescale Semiconductor...
Страница 308: ...MCU Timer PWM TPM Module MC1321x Reference Manual Rev 1 6 17 16 Freescale Semiconductor...
Страница 338: ...Inter Integrated Circuit IIC MC1321x Reference Manual Rev 1 6 19 14 Freescale Semiconductor...
Страница 372: ...Development Support MC1321x Reference Manual Rev 1 6 21 20 Freescale Semiconductor...