AnsweredAssumed Answered

S12G64  PLL Oscillator

Question asked by liu jacky on Dec 18, 2014
Latest reply on Jan 20, 2015 by liu jacky

hi,

I have a problem with PLL, follows are the program:

 

void PLL_Init(void)

{

CPMUOSC_OSCE = 1; /* enable ext osc */

/*

  Initialise the system clock from a 16 MHz Crystal,

  24 MHz Bus CLK (48 MHz VCO, 48 MHz PLL)

*/

CPMUSYNR = 0x00 | 0x05; /* VCOFRQ[7:6], SYNDIV[5:0] */

CPMUREFDIV = 0x00 | 0x03; /* REFFRQ[7:6], REFDIV[3:0] */

CPMUPOSTDIV = 0x00; /* POSTDIV = 0 FPLL = FVCO */

while(!CPMUFLG_LOCK); /* wait for VCO to stabilize*/

//Service_WD();

CPMUCLKS_PLLSEL = 1; /* Switch clk to use PLL */

}

 

It stops at "while(!CPMUFLG_LOCK); " , I have checked the value of REFDIV and SYNDIV, they are right the value programmed, and I have checked the EXTAL pin;

Is something wrong with my program? or something wrong with the hardware?

please help me ! amd sorry for my poor english!

Outcomes