|
spinnaker_tools (BMP) latest
SpiNNaker BMP firmware
|
Clock configuration code for BMP LPC1768. More...
#include "lpc17xx.h"#include "lpc17xx_clkpwr.h"Macros | |
| #define | XTAL_CLK 25000000 |
| #define | PCLKSEL0_V |
| Peripheral clock speed selection: clock 0. | |
| #define | PCLKSEL1_V |
| Peripheral clock speed selection: clock 1. | |
| #define | SCS_V 0x00000030 |
| Range 15-25MHz, main osc on. | |
| #define | CCLKCFG_V 0x00000002 |
| Divide PLL0 by 3 for CCLK. | |
| #define | CLKSRCSEL_V 0x00000001 |
| Main clock -> PLL0. | |
| #define | PLL0CFG_V 0x0001000b |
| N = 2, M = 12. | |
| #define | FLASHCFG_V 0x0000403a |
| Flash uses 5 clks / access. | |
| #define | PLL_UP ((1 << 25) | (1 << 24)) |
| PLL is up. | |
| #define | PLL_LOCK (1 << 26) |
| PLL has locked. | |
| #define | OSC_UP (1 << 6) |
| Oscillator is up. | |
| #define | PCONP_V |
| Which peripherals get a clock signal. | |
Enumerations | |
| enum | bmp_clock_div { PDIV4 = 0 , PDIV1 = 1 , PDIV2 = 2 , PDIV8 = 3 } |
| Clock divisors. | |
| enum | bmp_clock_0_select { PCLKSEL_WDT = 0 , PCLKSEL_TIMER0 = 2 , PCLKSEL_TIMER1 = 4 , PCLKSEL_UART0 = 6 , PCLKSEL_UART1 = 8 , PCLKSEL_PWM1 = 12 , PCLKSEL_I2C0 = 14 , PCLKSEL_SPI = 16 , PCLKSEL_SSP1 = 20 , PCLKSEL_DAC = 22 , PCLKSEL_ADC = 24 , PCLKSEL_CAN1 = 26 , PCLKSEL_CAN2 = 28 , PCLKSEL_ACF = 30 } |
| enum | bmp_clock_1_select { PCLKSEL_QEI = 0 , PCLKSEL_PCB = 4 , PCLKSEL_I2C1 = 6 , PCLKSEL_SSP0 = 10 , PCLKSEL_TIMER2 = 12 , PCLKSEL_TIMER3 = 14 , PCLKSEL_UART2 = 16 , PCLKSEL_UART3 = 18 , PCLKSEL_I2C2 = 20 , PCLKSEL_I2S = 22 , PCLKSEL_RIT = 26 , PCLKSEL_SYSCON = 28 , PCLKSEL_MC = 30 } |
| enum | bmp_clock_power_control { PCONP_PCTIM0 = (1<<1) , PCONP_PCTIM1 = (1<<2) , PCONP_PCUART0 = (1<<3) , PCONP_PCUART1 = (1<<4) , PCONP_PCPWM1 = (1<<6) , PCONP_PCI2C0 = (1<<7) , PCONP_PCSPI = (1<<8) , PCONP_PCRTC = (1<<9) , PCONP_PCSSP1 = (1<<10) , PCONP_PCAD = (1<<12) , PCONP_PCAN1 = (1<<13) , PCONP_PCAN2 = (1<<14) , PCONP_PCGPIO = (1<<15) , PCONP_PCRIT = (1<<16) , PCONP_PCMC = (1<<17) , PCONP_PCQEI = (1<<18) , PCONP_PCI2C1 = (1<<19) , PCONP_PCSSP0 = (1<<21) , PCONP_PCTIM2 = (1<<22) , PCONP_PCTIM3 = (1<<23) , PCONP_PCUART2 = (1<<24) , PCONP_PCUART3 = (1<<25) , PCONP_PCI2C2 = (1<<26) , PCONP_PCI2S = (1<<27) , PCONP_PCGPDMA = (1<<29) , PCONP_PCENET = (1<<30) , PCONP_PCUSB = (1<<31) } |
Functions | |
| void | configure_clocks (void) |
| Configure the clocks. | |
Clock configuration code for BMP LPC1768.
| #define PCLKSEL0_V |
Peripheral clock speed selection: clock 0.
| #define PCLKSEL1_V |
Peripheral clock speed selection: clock 1.
| #define PCONP_V |
Which peripherals get a clock signal.