The internal oscillator of the LPC1114 does not start

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

The internal oscillator of the LPC1114 does not start

904件の閲覧回数
liufeng123
Contributor II

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;

0 件の賞賛
返信
2 返答(返信)

740件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi liu feng,

   Please use the CLKOUT pin to test the IRC oscillator and system oscillator at first.

   This is the clock block diagram:

pastedImage_1.png

If you want to use the IRC oscillator, and use the PLL, in the MAINCLKSEL, you need to select sys_pllclkout, in SYSPLLCLKSEL, you need to select IRC oscillator, not the system oscillator.  After the configuration, I suggest you use the CLKOUT pin to test the main clock at first, just make sure your timer have the clock.

Wish it helps you!

If you still have question, please kindly let me know!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

740件の閲覧回数
liufeng123
Contributor II

i have solved the problem,thanks