各位专家好,我用的是c6678,想调整sysclk2 的频率,按照datasheet上的流程,自己写的pll程序运行之后发现dsp仿真时频率根本没有变化,不知道是哪个地方出了问题,还请各位老师指点一下
CSL_PllcHandle hPllc;
Uint8 goStatus;
hPllc = CSL_PLLC_open (0);
CSL_PLLC_setPllCtrlPllEn (hPllc, 0); // Put PLLC in Bypass mode
CSL_PLLC_setPllCtrlPllEnSrc (hPllc, 0); // Enable PLLEN bit configuration
CSL_PLLC_setPllSecCtrlReg (hPllc, 0x10); //configure the SECCTL.
CSL_PLLC_setPllCtrlPllPowerDown (hPllc, 1); // Power down PLL
CSL_PLLC_setPllCtrlPllPowerDown (hPllc, 0); // Wake up PLL
CSL_PLLC_setPllMultiplierCtrlReg (hPllc, 1); // Setup x1 multiplier rate
CSL_PLLC_setPllPreDivReg (hPllc, 1, 0); // Setup /1 divider rate and enable divider
CSL_PLLC_getPllStatusReg (hPllc, &goStatus); // Ensure no GO operation in progress already
while (goStatus != 0)
{
CSL_PLLC_getPllStatusReg (hPllc, &goStatus); // wait some time and recheck GOSTAT status
}
CSL_PLLC_setPllDivReg (hPllc, 2,1, 0x40); // Setup /1 divider rate and enable divider 1
CSL_PLLC_setPllAlignCtrlReg (hPllc, 2); // Set the respective ALNn bit in ALNCTL register
CSL_PLLC_setPllCmdReg (hPllc, 1); // Start GO operation
CSL_PLLC_getPllStatusReg (hPllc, &goStatus); // Ensure GO operation completes
while (goStatus != 0)
{
CSL_PLLC_getPllStatusReg (hPllc, &goStatus); // wait some time and recheck GOSTAT status
}
CSL_PLLC_setPllSecCtrlReg (hPllc, 0x00); //configure the SECCTL. 5th bit:BYPASS. 1-4bit:the od
CSL_PLLC_setPllCtrlPllEn (hPllc, 1); // Put PLLC back in PLL mode
yanan hou:
回复 noaming:
您好,PLL配置的官方例程能提供下吗,在MCSDK中没有找到啊?