MC9S12G64: Using external oscillator (not crystal)

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MC9S12G64: Using external oscillator (not crystal)

ソリューションへジャンプ
1,342件の閲覧回数
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)
0 件の賞賛
返信
1 解決策
999件の閲覧回数
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 返答(返信)
999件の閲覧回数
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 件の賞賛
返信
1,000件の閲覧回数
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 件の賞賛
返信
999件の閲覧回数
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 件の賞賛
返信