Dmitry Kovalev
/
LG2
fork
Fork of LG by
Diff: system_LPC17xx.c
- Revision:
- 133:90d0bf0e2996
- Parent:
- 132:2c7bec5cf6fe
- Child:
- 134:caf4c9cd5052
--- a/system_LPC17xx.c Wed Apr 13 15:01:16 2016 +0000 +++ b/system_LPC17xx.c Wed Apr 13 16:49:22 2016 +0000 @@ -299,6 +299,7 @@ // 412,8 / "4" = 103,2 #define CLOCK_SETUP 1 + //System control - system control and status register: // bit 4 - main oscillator range: // 0 - 1...20MHz @@ -694,3 +695,25 @@ #endif } +void SystemInitDef (void) +{ + + + // LPC_SC->SCS = SCS_Val;//0x20 - enable main oscillator,1...20MHz (12MHz) + // if (SCS_Val & (1 << 5)) { /* If Main Oscillator is enabled */ + // while ((LPC_SC->SCS & (1<<6)) == 0);/* Wait for Oscillator to be ready */ +// LPC_SC->CLKSRCSEL = 0;//CLKSRCSEL_Val;//1 - Select the main oscillator as the PLL0 clock source +// while ((LPC_SC->SCS & (1<<6)) == 0);/* Wait for Oscillator to be ready */ +// LPC_SC->SCS = SCS_Val;//0x20 - enable main oscillator,1...20MHz (12MHz) + +// LPC_SC->PCLKSEL0 = PCLKSEL0_Val; /* Peripheral Clock Selection */ +// LPC_SC->PCLKSEL1 = PCLKSEL1_Val; + +// LPC_SC->PCONP = PCONP_Val; /* Power Control for Peripherals */ + +// LPC_SC->CLKOUTCFG = CLKOUTCFG_Val; /* Clock Output Configuration */ + + + +} +