rfLPC
A low level library for using NXP's LPC17xx SoC. Config is given for MBED prototyping board
|
The following defines are used to configure the library to use with the MBED. More...
Clock configuration | |
Dividers and multipliers for controlling the CPU clock. The PLL output clock frequency is given by: (2*PLL_MULTIPLIER*MAIN_OSCILLATOR_FREQUENCY)/INPUT_DIVIDER This clock is then divided by CPU_DIVIDER to clock the CPU. CPU is set to 96Mhz using the 12Mhz source for PLL0. (see mbed schematic, main oscillator is a 12Mhz crystal connected to pins XTAL1 and XTAL2) As this setup is suitable for USB, PPL0 can be used to clock USB (need a 48Mhz mutiple) With the given configuration (INPUT_DIVIDER=1, PLL_MULTIPLIER=12, CPU_DIVIDER=3), PLL ouput is 2*12*12000000/1 = 288Mhz Divided by 3 -> CPU is at 96 Mhz
| |
#define | RFLPC_CLOCK_USE_MAIN_OSCILLATOR |
If defined, the rflpc_clock_init() function will use the main oscillator. More... | |
#define | RFLPC_CLOCK_MAIN_OSCILLATOR_FREQUENCY 12000000 |
The frequency of the main oscillator if used. More... | |
#define | RFLPC_CLOCK_INPUT_DIVIDER 1 |
PLL0 will divide its input by this value. More... | |
#define | RFLPC_CLOCK_PLL_MULTIPLIER 12 |
PLL0 will multiply its input by this value. More... | |
#define | RFLPC_CLOCK_CPU_DIVIDER 3 |
The PLL0 output will be divided by this value to provide CPU clock. More... | |
LEDs configuration | |
#define | RFLPC_LED_1_PIN RFLPC_PIN_P1_18 |
On which pin is the LED1 ? | |
#define | RFLPC_LED_2_PIN RFLPC_PIN_P1_20 |
On which pin is the LED2 ? | |
#define | RFLPC_LED_3_PIN RFLPC_PIN_P1_21 |
On which pin is the LED3 ? | |
#define | RFLPC_LED_4_PIN RFLPC_PIN_P1_23 |
On which pin is the LED4 ? | |
PHY device configuration | |
#define | RFLPC_ETH_PHY_ADDR (0x01) |
MII Address of the PHY device. More... | |
#define | RFLPC_ETH_USE_EXTENDED_MII |
Define this constant to use the MII extended register set. More... | |
UART Configuration | |
#define | RFLPC_UART0_TXD_PIN RFLPC_PIN_P0_2 |
UART0 TX Pin. | |
#define | RFLPC_UART0_RXD_PIN RFLPC_PIN_P0_3 |
UART0 RX Pin. | |
#define | RFLPC_UART0_PIN_FUNCTION 1 |
Depending on the platform, the pins used for uart0 are not the same and they do not use the same value for configuring multi-purpose pins (cf. More... | |
#define | RFLPC_UART2_TXD_PIN 10 |
UART2 TX Pin. | |
#define | RFLPC_UART2_RXD_PIN 11 |
UART2 RX Pin. | |
#define | RFLPC_UART2_PIN_FUNCTION 1 |
Depending on the platform, the pins used for uart0 are not the same and they do not use the same value for configuring multi-purpose pins (cf. More... | |
#define | RFLPC_UART3_TXD_PIN 0 |
UART3 TX Pin. | |
#define | RFLPC_UART3_RXD_PIN 1 |
UART3 RX Pin. | |
#define | RFLPC_UART3_PIN_FUNCTION 2 |
Depending on the platform, the pins used for uart0 are not the same and they do not use the same value for configuring multi-purpose pins (cf. More... | |
Stack configuration | |
#define | RFLPC_STACK_SIZE 1024 |
size of the stack in bytes | |
Interrupt configuration | |
#define | RFLPC_IRQ_DEBUG_ENABLE |
If this constant is defined, then freeze the device on unhandled interrupt. | |
#define | RFLPC_IRQn_COUNT (PLL1_IRQn + 16 +1) |
This is the size of the interrupt vector. | |
The following defines are used to configure the library to use with the MBED.
#define RFLPC_CLOCK_CPU_DIVIDER 3 |
The PLL0 output will be divided by this value to provide CPU clock.
Definition at line 79 of file config-mbed.h.
#define RFLPC_CLOCK_INPUT_DIVIDER 1 |
PLL0 will divide its input by this value.
Definition at line 75 of file config-mbed.h.
#define RFLPC_CLOCK_MAIN_OSCILLATOR_FREQUENCY 12000000 |
The frequency of the main oscillator if used.
Definition at line 71 of file config-mbed.h.
#define RFLPC_CLOCK_PLL_MULTIPLIER 12 |
PLL0 will multiply its input by this value.
Definition at line 77 of file config-mbed.h.
#define RFLPC_CLOCK_USE_MAIN_OSCILLATOR |
If defined, the rflpc_clock_init() function will use the main oscillator.
Definition at line 66 of file config-mbed.h.
#define RFLPC_ETH_PHY_ADDR (0x01) |
MII Address of the PHY device.
Definition at line 149 of file config-mbed.h.
#define RFLPC_ETH_USE_EXTENDED_MII |
Define this constant to use the MII extended register set.
Disabling this will:
Definition at line 161 of file config-mbed.h.
#define RFLPC_UART0_PIN_FUNCTION 1 |
Depending on the platform, the pins used for uart0 are not the same and they do not use the same value for configuring multi-purpose pins (cf.
user manual PINSEL* registers) .
Definition at line 173 of file config-mbed.h.
#define RFLPC_UART2_PIN_FUNCTION 1 |
Depending on the platform, the pins used for uart0 are not the same and they do not use the same value for configuring multi-purpose pins (cf.
user manual PINSEL* registers) .
Definition at line 180 of file config-mbed.h.
#define RFLPC_UART3_PIN_FUNCTION 2 |
Depending on the platform, the pins used for uart0 are not the same and they do not use the same value for configuring multi-purpose pins (cf.
user manual PINSEL* registers) .
Definition at line 187 of file config-mbed.h.