Oscillator stops on MC9S08

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

Oscillator stops on MC9S08

983 次查看
ratatosk
Contributor I

Hi 

I am using a resonator 

10.0MHz +/-0.5% Built-in caps Chip type:

Murata CSTCC10M0G53-R0

The resonator is connected in parallel with a resistor 1MOhm and 220R in series.

The chip uses the internal oscillator. The 10 MHz is used for Baud rate generation for the UART.

It happens that oscillator stops.

 

Any ideas?

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

456 次查看
Denikar
Contributor III

 

How are you setting your MCGC2 register?  Note there are specific settings based on if you are telling the micro that you want to use an external oscillator or resonator, the crystal/resonator frequency range, and if the oscillator is to be driven in a high gain mode. 

 

/*

Transition to BLPE mode
Setup clock control register 2
b7:b6 BDIV =       00 Set freq divider to divide by 1
b5:   RANGE =      1  Configure for ext osc range of 1MHz to 16MHz
b4:   HGO =        1  Config external osc for high gain operation
b3:   LP =         1  FLL or PLL is disabled in bypass modes
b2:   EREFS =      1  Indicate external oscillator is requested
b1:   ERCLKEN =    1  Enable MCGERCLK external ref clock
b0:   EREFSTEN =   0  External ref clock MCGERCLK is disabled in stop mode  */
MCGC2 = 0x3E;

 

0 项奖励
回复