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
MC9S08PA4 Reference Manual, Rev. 5, 08/2017
162
NXP Semiconductors
Содержание MC9S08PA4
Страница 1: ...MC9S08PA4 Reference Manual Supports MC9S08PA4 Document Number MC9S08PA4RM Rev 5 08 2017 ...
Страница 2: ...MC9S08PA4 Reference Manual Rev 5 08 2017 2 NXP Semiconductors ...
Страница 22: ...MC9S08PA4 Reference Manual Rev 5 08 2017 22 NXP Semiconductors ...
Страница 28: ...System clock distribution MC9S08PA4 Reference Manual Rev 5 08 2017 28 NXP Semiconductors ...
Страница 150: ...Port data registers MC9S08PA4 Reference Manual Rev 5 08 2017 150 NXP Semiconductors ...
Страница 196: ...Human machine interfaces HMI MC9S08PA4 Reference Manual Rev 5 08 2017 196 NXP Semiconductors ...
Страница 224: ...Instruction Set Summary MC9S08PA4 Reference Manual Rev 5 08 2017 224 NXP Semiconductors ...
Страница 232: ...Functional Description MC9S08PA4 Reference Manual Rev 5 08 2017 232 NXP Semiconductors ...
Страница 258: ...FTM Interrupts MC9S08PA4 Reference Manual Rev 5 08 2017 258 NXP Semiconductors ...
Страница 268: ...Initialization application information MC9S08PA4 Reference Manual Rev 5 08 2017 268 NXP Semiconductors ...
Страница 294: ...Functional description MC9S08PA4 Reference Manual Rev 5 08 2017 294 NXP Semiconductors ...
Страница 370: ...Memory map and register description MC9S08PA4 Reference Manual Rev 5 08 2017 370 NXP Semiconductors ...
Страница 398: ...Resets MC9S08PA4 Reference Manual Rev 5 08 2017 398 NXP Semiconductors ...
Страница 400: ...MC9S08PA4 Reference Manual Rev 5 08 2017 400 NXP Semiconductors ...