MC9S12G64: Using external oscillator (not crystal)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MC9S12G64: Using external oscillator (not crystal)

Jump to solution
1,131 Views
ZdenoQC
Contributor III

Hi everyone,

 

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

 

Thanks you

Labels (1)
0 Kudos
1 Solution
788 Views
iggi
NXP Employee
NXP Employee

The main thing is that S12G device does not support external oscillator, only crystal in LCP connection. The

MC9S12G Family Reference Manual and Data Sheet clearly states on page 44:

Main External Oscillator (XOSCLCP)

• Loop control Pierce oscillator using a 4 MHz to 16 MHz crystal

Btw, it seems like the VCOFRQ[1:0] values is incorrect. There should be CPMUSYNR = 0x56;

In the reference manual, find the chapter 10.1.2 Modes of Operation. There are described 3 different PLL modes: PEI, PEE, PBE. You can test these modes using SW example codes made for S12G devices. This is the part of the application note AN4455 MC9S12G64 Demonstration Lab Training. Download link below:

http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4455.pdf

http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4455SW.zip

Regards,

Ivan

View solution in original post

0 Kudos
3 Replies
788 Views
bigmac
Specialist III

Hello,

You might try the following configuration -

Connect a 1Mohm resistor between the XTAL and EXTAL pins of the MCU.  Then couple the external signal from the RF chip to the EXTAL pin using a series capacitor, say 100 pF.

Regards,

Mac


0 Kudos
789 Views
iggi
NXP Employee
NXP Employee

The main thing is that S12G device does not support external oscillator, only crystal in LCP connection. The

MC9S12G Family Reference Manual and Data Sheet clearly states on page 44:

Main External Oscillator (XOSCLCP)

• Loop control Pierce oscillator using a 4 MHz to 16 MHz crystal

Btw, it seems like the VCOFRQ[1:0] values is incorrect. There should be CPMUSYNR = 0x56;

In the reference manual, find the chapter 10.1.2 Modes of Operation. There are described 3 different PLL modes: PEI, PEE, PBE. You can test these modes using SW example codes made for S12G devices. This is the part of the application note AN4455 MC9S12G64 Demonstration Lab Training. Download link below:

http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4455.pdf

http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4455SW.zip

Regards,

Ivan

0 Kudos
788 Views
ZdenoQC
Contributor III

Thanks you for the info. I would have like this to work, but I will have to work without it.

I have tried some level translator to lower the oscillator voltage, but at the end, it was unstable.

Thanks again!

William

0 Kudos