小白刚上手kea64的开发板,在看手册时有配置外部晶振的代码:
/* the following code segment demonstrates setting ICS to FEE mode generating 32.768MHZ bus*/
/* supposing external 32.768K crystal is installed */
OSC_CR = 0xB0; /* enable oscillator with low power mode */
ICS_C2 = 0x00; /* BDIV=0, no prescalar/
while ((OSC_CR & OSC_CR_OSCINIT_MASK) == 0); /* waiting until oscillator is ready */
ICS_C1 = 0x80; /* external clock reference (32.768kHz) to FLL, RDIV = 0, external prescalar
= 0 */
但运行时一直卡在while ((OSC_CR & OSC_CR_OSCINIT_MASK) == 0);
人都要晕了,求帮助!!!
是不是还没有寄存器没配置完? |