8.3.1 Initializing FEI mode
The following code segment demonstrates setting ICS to FEI mode.
Example: 8.3.1.1 FEI mode initialization routine
/* the following code segment demonstrates setting ICS to FEI mode generating 20MHz bus*/
ICS_C2 = 0x00;
ICS_C1 = 0x04; /* internal reference clock to FLL */
ICS_C2 = 0x00; /* BDIV = 0, no prescalar */
ICS_C3 = TRIM_VALUE_39K0625HZ; /* FLL output 20MHz, TRIM_VALUE_39K0625HZ is ~0x50 typically
*/
/* the following code segment demonstrates setting ICS to FEI mode generating 5MHz bus*/
ICS_C2 = 0x00;
ICS_C1 = 0x04; /* internal reference clock to FLL */
ICS_C2 = 0x40; /* BDIV = 2, prescalar = 4 */
ICS_C3 = TRIM_VALUE_39K0625HZ; /* FLL output 20MHz, TRIM_VALUE_39K0625HZ is ~0x50 typically
*/
/* the following code segment demonstrates setting ICS to FEI mode generating 500kHz bus*/
ICS_C2 = 0x00;
ICS_C1 = 0x04; /* internal reference clock to FLL */
ICS_C2 = 0xA0; /* BDIV = 5, prescalar = 32 */
ICS_C3 = TRIM_VALUE_31K25HZ; /* FLL output 16MHz, TRIM_VALUE_31K25HZ is ~0x90 typically */
8.3.2 Initializing FBI mode
The following code segment demonstrates setting ICS to FBI mode.
Example: 8.3.2.1 FBI mode initialization routine
/* the following code segment demonstrates setting ICS to FBI mode generating 32768Hz bus*/
ICS_C2 = 0x00;
ICS_C1 = 0x40;
ICS_C2 = 0x00;
ICS_C3 = TRIM_VALUE_32K768HZ; /* TRIM_VALUE_31K25HZ is ~0x90 typically */
8.3.3 Initializing FEE mode
The following code segment demonstrates setting ICS to FEE mode.
Example: 8.3.3.1 FEE mode initialization routine
/* the following code segment demonstrates setting ICS to FEE mode generating 8MHZ bus*/
/* supposing external 4MHZ crystal is installed in high gain mode */
ICS_OSCSC = 0x96; /* high-range, high-gain, oscillator required */
while (ICS_OSCINIT == 0); /* waiting until oscillator is ready */
ICS_C1 = 0x10; /* external clock reference (31.25kHz) to FLL, RDIV = 2, external prescalar =
128 */
ICS_C2 = 0x20; /* BDIV = 1, prescalar = 2 */
Initialization / application information
MC9S08PT60 Reference Manual, Rev. 4, 08/2014
212
Freescale Semiconductor, Inc.
Содержание MC9S08PT60
Страница 2: ...MC9S08PT60 Reference Manual Rev 4 08 2014 2 Freescale Semiconductor Inc...
Страница 34: ...MC9S08PT60 Reference Manual Rev 4 08 2014 34 Freescale Semiconductor Inc...
Страница 40: ...System clock distribution MC9S08PT60 Reference Manual Rev 4 08 2014 40 Freescale Semiconductor Inc...
Страница 120: ...Flash and EEPROM registers descriptions MC9S08PT60 Reference Manual Rev 4 08 2014 120 Freescale Semiconductor Inc...
Страница 200: ...Port data registers MC9S08PT60 Reference Manual Rev 4 08 2014 200 Freescale Semiconductor Inc...
Страница 228: ...System clock gating control registers MC9S08PT60 Reference Manual Rev 4 08 2014 228 Freescale Semiconductor Inc...
Страница 262: ...Human machine interfaces HMI MC9S08PT60 Reference Manual Rev 4 08 2014 262 Freescale Semiconductor Inc...
Страница 298: ...Functional Description MC9S08PT60 Reference Manual Rev 4 08 2014 298 Freescale Semiconductor Inc...
Страница 396: ...FTM Interrupts MC9S08PT60 Reference Manual Rev 4 08 2014 396 Freescale Semiconductor Inc...
Страница 440: ...Functional description MC9S08PT60 Reference Manual Rev 4 08 2014 440 Freescale Semiconductor Inc...
Страница 468: ...Initialization Application Information MC9S08PT60 Reference Manual Rev 4 08 2014 468 Freescale Semiconductor Inc...
Страница 570: ...Application information MC9S08PT60 Reference Manual Rev 4 08 2014 570 Freescale Semiconductor Inc...
Страница 648: ...Memory map and register description MC9S08PT60 Reference Manual Rev 4 08 2014 648 Freescale Semiconductor Inc...
Страница 676: ...Resets MC9S08PT60 Reference Manual Rev 4 08 2014 676 Freescale Semiconductor Inc...