MC9S12G64: Using external oscillator (not crystal)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MC9S12G64: Using external oscillator (not crystal)

跳至解决方案
1,145 次查看
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

标签 (1)
标记 (4)
0 项奖励
回复
1 解答
802 次查看
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 项奖励
回复
3 回复数
802 次查看
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 项奖励
回复
803 次查看
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 项奖励
回复
802 次查看
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 项奖励
回复