AnsweredAssumed Answered

The internal oscillator of the LPC1114 does not start

Question asked by liu feng on Apr 6, 2018
Latest reply on Apr 6, 2018 by liu feng

I want to use the internal oscillator,but the  internal oscillator of the LPC1114 does not start。The phenomenon appears as when we use the extern oscillator,the timer can work well ,but when we use the  internal oscillator,the same timer can not work.the configurations of the internal oscillator are as follows:

 

 

 

uint32_t i;
LPC_SYSCON->PDRUNCFG &= ~(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3 | 1 << 5 | 1 << 7); /* Power-up System Osc */
LPC_SYSCON->SYSOSCCTRL = 0x00000000;晶振不被旁路
for (i = 0; i < 200; i++) __NOP();
LPC_SYSCON->SYSPLLCLKSEL = 0x00000001; /* 选择系统时钟 */
LPC_SYSCON->SYSPLLCLKUEN = 0x01; /* Update Clock Source */
LPC_SYSCON->SYSPLLCLKUEN = 0x00; /* Toggle Update Register */
LPC_SYSCON->SYSPLLCLKUEN = 0x01;
while (!(LPC_SYSCON->SYSPLLCLKUEN & 0x01)); /* Wait Until Updated */

LPC_SYSCON->SYSPLLCTRL = 0x00000003; //系统时钟倍频
LPC_SYSCON->PDRUNCFG &= ~(1 << 7); /* Power-up SYSPLL */
while (!(LPC_SYSCON->SYSPLLSTAT & 0x01)); //确定PLL锁定以后向下执行

LPC_SYSCON->MAINCLKSEL = 0x00000000; /* Select 内部振荡器输出 */
LPC_SYSCON->MAINCLKUEN = 0x01; /* Update MCLK Clock Source */
LPC_SYSCON->MAINCLKUEN = 0x00; /* Toggle Update Register */
LPC_SYSCON->MAINCLKUEN = 0x01;

Outcomes