Hi,
Can somebody please tell why the following PLL setting procedure doesn't work?
static void PLLsetting(void){ sysRegs->KICK0R = 0x83e70b13; sysRegs->KICK1R = 0x95A4F1E0; // Two values for unlocking SYSCFG registers. sysRegs->CFGCHIP0 = (sysRegs->CFGCHIP0) & !(1 << CSL_SYSCFG_CFGCHIP0_PLL_MASTER_LOCK_SHIFT); sysRegs->CFGCHIP3 = (sysRegs->CFGCHIP3) & !(1 << CSL_SYSCFG_CFGCHIP3_PLL1_MASTER_LOCK_SHIFT); // Unlocking the PPL registers for both PLL0 and PLL1 ////////////////////////////////////////PLL Setting////////////////////////////////////////////// pllRegs->PLLCTL = (pllRegs->PLLCTL) & !(1 << 8); //Reference clock selection pllRegs->PLLCTL = (pllRegs->PLLCTL) & !(1 << 5); //PLLENSRC bit activate PLLEN pllRegs->PLLCTL = (pllRegs->PLLCTL) & !(1<<9); //External clock source selection to OSCIN pllRegs->PLLCTL = (pllRegs->PLLCTL) & !(1<<0); //Bypassing the PLL by clearing PLLEN bit delay(100); pllRegs->PLLCTL = (pllRegs->PLLCTL) & !(1<<3); //Reseting the PLL pllRegs->PLLCTL = (pllRegs->PLLCTL) & !(1<<1); //Bringing the PLL out of power-down pllRegs->PREDIV = ((pllRegs->PREDIV) & (0xFFFFFFE0)) | (0x000000000); pllRegs->PLLM = ((pllRegs->PLLM) & (0xFFFFFFE0)) | (0x000000017); //Loading the multiplier value. It is 11 here as the //output of the PLL should be between 300 and 600 for this device. pllRegs->POSTDIV = ((pllRegs->POSTDIV) & (0xFFFFFFE0)) | (0x0000000C); //Loading the post divider value. pllRegs->POSTDIV = (pllRegs->POSTDIV) | (1<<15); //Loading the post divider value. pllRegs->PLLCTL = (pllRegs->PLLCTL) | (1<<3); //Bringing the PLL out of reset delay(100); pllRegs->PLLCTL = (pllRegs->PLLCTL) | (1<<0); //Bringing the PLL out of bypass sysRegs->CFGCHIP0 = (sysRegs->CFGCHIP0) | (1 << CSL_SYSCFG_CFGCHIP0_PLL_MASTER_LOCK_SHIFT); sysRegs->CFGCHIP3 = (sysRegs->CFGCHIP3) | (1 << CSL_SYSCFG_CFGCHIP3_PLL1_MASTER_LOCK_SHIFT); // Locking the PPL registers sysRegs->KICK0R = 0x00000000; //Locking the SYSCFG register sysRegs->KICK1R = 0x00000000; }
I'm using LCDK6748 and running an LED blinking project on it, but the speed of the blinking doesn't change at all.
By the way, I am using AISgen for generating .bin file. Does it effect the PLL setting. I keep the 'Configure PLL0' check box disabled.
Any help would be appreciated.