32.768K external crystal can't work in MC9S08QG4

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

32.768K external crystal can't work in MC9S08QG4

Jump to solution
482 Views
wangbaode
Contributor IV

hello ,

I want to use RTI in MC9S08QG4 and use external clock as RTI clcok.

so I connect a 32.768K crystal as the picture.but it can't work.

8499_8499.pngpastedImage_0.png

RF = 1M,C1=C2=18pf.

my code is as follow:

    ICSC2_ERCLKEN = 1;//enable external clock as erclk

   ICSC2_EREFSTEN = 1;//enable erclk in stop mode

   

   

    ICSC2_RANGE = 0;//1==.high frequency,0=>low frequency

    ICSC2_EREFS = 1;//1=>select osc as external clock source    

    

    ICSC1_IREFS = 0; //0=>external clock is selected,

    ICSC1_CLKS = 2; //0=>out of FLL is selected,2=>external clk is select

   

    ICSC1_RDIV = 0;// 0=>prescale ==1

   

    

    ICSC2_BDIV = 0;

   

    while(!ICSSC_OSCINIT);

Labels (1)
Tags (4)
0 Kudos
1 Solution
357 Views
wangbaode
Contributor IV

hi,

I make a mistake in hardware.

when i change RF to a 10M resistor,my program can work well.

View solution in original post

0 Kudos
1 Reply
358 Views
wangbaode
Contributor IV

hi,

I make a mistake in hardware.

when i change RF to a 10M resistor,my program can work well.

0 Kudos