HC(S)08DZ - crystal stays silent

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

HC(S)08DZ - crystal stays silent

1,152 次查看
mykey
Contributor I

Hi everyone,

 

I'm new to freescale's micro controllers. I was recommended the hcs08 for their internal CAN Controller, high stability and small package.

At the moment I'm trying to start external crystal for CAN clocksource, but I'm really getting nuts, because the crystal stays silent. I looked for some reference code in here and found something like the following:

 

SOPT1_COPT = 0; /* disable COP */
SOPT2_MCSEL = 1; /* enable MCLK. MCLK = BUSCLK/2 */
PTGDD = 0xfe; /* EXTAL Input, XTAL Output */
MCGC2 = 0x36; /* RANGE HF, High Gain,External Reference Selcet Oscillator, MCGERCLK active */
while (!MCGSC_OSCINIT);

 

Debugger halts at oscillator initialisation, and the flag won't be set. With a 8pF probe, i won't see anything but the crystall should be swinging here, right?

 

I changed Crystal and capacitor up and down and I'm still missing reaction.

Q1 = 16MHzQ2=7.3 MHz

C1/2= 10-18pFC1/2=12pF

Rf= infinite/ 1MOhm

Rs=0

 

Can anyone help me out, I'm getting nuts fixing the bug.

 

thank you very much

Maik

标签 (1)
0 项奖励
回复
1 回复

1,046 次查看
bigmac
Specialist III

Hello Maik, and welcome to the forum.

 

When using a crystal, Rf cannot be "infinite".  A resistor value of 1M should be OK.  The resistor is required to bias the oscillator circuit, so that oscillations occur in the linear part of the input-to-output characteristic.  You can check this by measuring the DC voltage at the oscillator output pin.  It should lie at approximately Vdd/2.

 

Leave PTGDD at POR default, although this should not matter since enabling the oscillator circuit should over-ride the GPIO setting.

 

I would expect you to be able to observe the oscillations on an oscilloscope having sufficient bandwidth.  I assume that you are using a x10 probe setting.

 

I assume that you have tried more than one 16MHz crystal.  These are quite fragile, an may not withstand being dropped.

 

Regards,

Mac

0 项奖励
回复