TI专家,各位朋友:
我想把PLL0配置Bypass模式,可是发现PLLCTL寄存器无法写入。配置代码如下:
void PLL0_Bypass_Config(void)
{
SysCfgRegistersUnlock();
CFGCHIP0=CFGCHIP0&(~(1<<4));
//Clear the PLLENSRC bit in PLLCTL to 0 (allows PLLEN bit to take effect).
PLLCTL&=(~(1<<5));
//For PLL0 only, select the clock source by programming the EXTCLKSRC bit in PLLCTL.
PLLCTL&=(~(1<<9));
//Clear the PLLEN bit in PLLCTL to 0 (PLL in bypass mode).
PLLCTL=(~(0x00000001));
//Wait for 4 OSCIN cycles to ensure that the PLLC has switched to bypass mode.
for(num=0;num<4;num++)
{
asm(" NOP");
}
// Clear the PLLRST bit in PLLCTL to 0 (resets PLL).
PLLCTL=PLLCTL&(~(1<<3));
/*Set the PLLRST bit in PLLCTL to 1 to bring the PLL out of reset*/
PLLCTL |= 0x8;
/*Wait for PLL to lock. See PLL spec for PLL lock time*/
for(num=0;num<2400;num++)
{
asm(" NOP");
}
CFGCHIP0=CFGCHIP0|((1<<4));
SysCfgRegistersLock();
}
执行完上面的函数后,PLLCTL寄存器的值没有发生变化。但是调试中在CFGCHIP0=CFGCHIP0|((1<<4));这句设置断点,通过CCS查看寄存器那里,可以修改PLLCTL寄存器的值。请问上面的配置哪里有问题吗?

