|
CMSIS2000
0.0.7
|
Макросы | |
| #define | BSP_BOARD_HAS_UART0 1 |
| #define | BSP_BOARD_HAS_UART1 1 |
| #define | bsp_board_olimex_H2103 1 |
| #define | i_ARCH ARM7 |
| #define | i_BOARD olimex_H2103 |
| #define | i_MCU_FAMILY LPC2xxx |
| #define | i_MCU_MODEL 2103 |
| #define | i_VENDOR olimex |
| #define | i_VERSION 0x010000 |
| #define | PCLK_DIVIDER 4 |
| #define | PLL_MValue 3 |
| #define | PLL_PValue 1 |
| #define | XTAL_HZ 14745600UL |
| Setting the Phased Lock Loop (PLL) for Olimex LPC-H2103 14.7456 MHz crystal. | |
| #define BSP_BOARD_HAS_UART0 1 |
См. определение в файле bsp_board_olimex_H2103.h строка 51
| #define BSP_BOARD_HAS_UART1 1 |
См. определение в файле bsp_board_olimex_H2103.h строка 52
| #define bsp_board_olimex_H2103 1 |
См. определение в файле bsp_board_olimex_H2103.h строка 36
| #define i_ARCH ARM7 |
См. определение в файле bsp_board_olimex_H2103.h строка 39
| #define i_BOARD olimex_H2103 |
См. определение в файле bsp_board_olimex_H2103.h строка 45
| #define i_MCU_FAMILY LPC2xxx |
См. определение в файле bsp_board_olimex_H2103.h строка 41
| #define i_MCU_MODEL 2103 |
См. определение в файле bsp_board_olimex_H2103.h строка 43
| #define i_VENDOR olimex |
См. определение в файле bsp_board_olimex_H2103.h строка 47
| #define i_VERSION 0x010000 |
См. определение в файле bsp_board_olimex_H2103.h строка 49
| #define PCLK_DIVIDER 4 |
См. определение в файле bsp_board_olimex_H2103.h строка 107
| #define PLL_MValue 3 |
См. определение в файле bsp_board_olimex_H2103.h строка 103
| #define PLL_PValue 1 |
См. определение в файле bsp_board_olimex_H2103.h строка 104
| #define XTAL_HZ 14745600UL |
Setting the Phased Lock Loop (PLL) for Olimex LPC-H2103 14.7456 MHz crystal.
----------------------------------
Olimex LPC-H2103 has a 14.7456 mhz crystal
We'd like the LPC2106 to run at 53.2368 mhz (has to be an even multiple of crystal)
According to the Philips LPC2106 manual: M = cclk / Fosc where: M = PLL multiplier (bits 0-4 of PLLCFG) cclk = 53236800 hz Fosc = 14745600 hz
Solving: M = 53236800 / 14745600 = 3.6103515625 M = 4 (round up)
*Note: M - 1 must be entered into bits 0-4 of PLLCFG (assign 3 to these bits)
The Current Controlled Oscilator (CCO) must operate in the range 156 mhz to 320 mhz
According to the Philips LPC2106 manual: Fcco = cclk * 2 * P where: Fcco = CCO frequency cclk = 53236800 hz P = PLL divisor (bits 5-6 of PLLCFG)
Solving: Fcco = 53236800 * 2 * P P = 2 (trial value) Fcco = 53236800 * 2 * 2 Fcc0 = 212947200 hz (good choice for P since it's within the 156 mhz to 320 mhz range
From Table 19 (page 48) of Philips LPC2106 manual P = 2, PLLCFG bits 5-6 = 1 (assign 1 to these bits)
Finally: PLLCFG = 0 01 00011 = 0x23
Final note: to load PLLCFG register, we must use the 0xAA followed 0x55 write sequence to the PLLFEED register this is done in the short function feed() below
См. определение в файле bsp_board_olimex_H2103.h строка 96