I'm trying to use an external oscillator for the G64. The source is an RF chip that give me 13.56MHz. I calculate all the value for the CPMUSYNR, CPMUREFDIV but the PLL never lock. By going backward, I find that the bit CPMUFLG_UPOSC is always zero. Like if the micro doesn't detect the oscillation.
The clock source is plug to the EXTAL pin and XTAL pin is not plug.
Do I have some register to set for the UPOSC bit to go 1 or it's just not possible with this clock configuration?
Here is my code for now:
CPMUOSC = 0x80; //Enable oscillator
CPMUSYNR = 0x16; // VCO from 32 to 48MHz, SYNDIV = 22
CPMUREFDIV = 0x0C; // Fref from 1 to 2MHz, Fref = Fosc/13
while(!CPMUFLG_LOCK); // Wait for lock !!! Stop here !!!
CPMUCLKS_PLLSEL = 1; //Switch to PLL