I am using the sample code below to set my PLL frequency. I have tried to add code for 120MHz operation but it does not seem to work. Can anyone offer suggestion on how to get from 100MHz (works OK) to 120MHz (clock runs at 100MHz).
#define PLL_120M 1
#define PLL_100M 0
#define PLL_12M 0
#define PLL_98M 0void InitSystem(void)
{
Uint16 i;
// PLL set up from RTC
// bypass PLL
CONFIG_MSW = 0x0;#if (PLL_120M ==1)
PLL_CNTL2 = 0x8000; //CGCR2
PLL_CNTL4 = 0x0000; //CGCR4
PLL_CNTL3 = 0x0806; //CGCR3
PLL_CNTL1 = 0x8E4A; //CRCR1#elif (PLL_100M ==1)
PLL_CNTL2 = 0x8000;
PLL_CNTL4 = 0x0000;
PLL_CNTL3 = 0x0806;
PLL_CNTL1 = 0x8BE8;
#elif (PLL_12M ==1)
PLL_CNTL2 = 0x8000;
PLL_CNTL4 = 0x0200;
PLL_CNTL3 = 0x0806;
PLL_CNTL1 = 0x82ED;
#elif (PLL_98M ==1)
// 98.304 MHz
PLL_CNTL2 = 0x8000;
PLL_CNTL4 = 0x0000;
PLL_CNTL3 = 0x0806;
PLL_CNTL1 = 0x82ED;
#endifwhile ( (PLL_CNTL3 & 0x0008) == 0);
// Switch to PLL clk
CONFIG_MSW = 0x1;// clock gating
// enable all clocks
IDLE_PCGCR = 0;
IDLE_PCGCR_MSW = 0xFF84;// reset peripherals
PER_RSTCOUNT = 0x02;
PER_RESET = 0x00fb;
for (i=0; i< 200; i++);}
I would also like to get 150MHz working. Any additional suggestions for 150MHz operation would be appreciated.