智能车制作

标题: XS128 PLL [打印本页]

作者: 海彬    时间: 2011-9-25 17:58
标题: XS128 PLL
PLL相关寄存器讲解,不胜感激
作者: wanglichao    时间: 2011-9-26 00:02
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
作者: wanglichao    时间: 2011-9-26 00:02
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.
主要用着两个来实现超频




欢迎光临 智能车制作 (http://www.znczz.com/) Powered by Discuz! X3.2