这有一个由4M晶振产生8M总线频率的例子:
PCTL_BCS=0; /* Select clock source from XTAL */
PCTL_PLLON=0 /* Disable the PLL */
PCTL=0x02; /* Set the VCO Power-of-Two multiplier E=2 */
PMS=0x08; /* Set the Feedback divider N=8 */
PMRS=0x70; /* Set the VCO Linear multiplier L=112 */
PBWC=0x80; /* Select the operating modes */
PCTL_PLLON=1; /* Enable the PLL */
while(!PBWC_LOCK) { /* Wait */
}
PCTL_BCS=1; /* Select clock source from PLL */
__asm("nop");
__asm("nop");
|