void vPLLInit(void)//锁相环初始化
{ //BUS-CLOCK=PLL-CLOCK/2=32M
REFDV = 1; // set the REFDV register 16M*2*(3+1)/(1+1)=64M
SYNR =3; // set the SYNR register to give us a 64 MHz PLL-clock.
asm nop // nops required for PLL stability.
asm nop
asm nop
asm nop
while ((CRGFLG&0x08)==0); // wait here till the PLL is locked.
CLKSEL|=0x80; // switch the bus clock to the PLL.
}
设置总线时钟为32M