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.
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;