Thomas Hartmann

MC13213 locking  to external clock

Discussion created by Thomas Hartmann on Jul 2, 2008
Latest reply on Jul 3, 2008 by Thomas Hartmann
Hello,

I am stuck here with a problem by switching the controller in the MC13213 to the external clock mode with FLL engaged, FEE mode. The device wont lock to the external supplied 32,786kHz clock.

here is my initialiazation code:
Code:
ICGC1_RANGE = 0;        /* range low. */ICGC1_OSCSTEN = 1;      /* Osc enabled in off mode. */ICGC1_REFS = 0;         /* interal ref off  */ICGC1_CLKS1 = 1;ICGC1_CLKS0 = 1;        /*FEE external ref fll engaged */   while (!ICGS1_ERCS)    /* Wait for external reference to be stable. */    __RESET_WATCHDOG();  while (!ICGS2_DCOS)    /* Wait for external reference to be stable. */        __RESET_WATCHDOG();
and the controller allways stucks at:
while (!ICGS1_ERCS)
 the second while loop would be passed if the first is disabled. But anyway if I do so the clocking result is far from the expected behavior. The supplied external clock is stable and the shematic looks like the suggested in the datasheet with CLKO connected to EXTAL and XTAL n.c.

regards
thomas


Outcomes