MCF51QE Clock Question

Discussion created by sebasira on Jul 28, 2009
Latest reply on Jul 31, 2009 by sebasira

Hello everybody, I'm new with the QE family and I'm having some troubles to initializate the clock. I've worked a lot with HCS12 and HC0, but never with QE.


This is what I do:


ICSC2 = 0x00;

ICSC1 = 0x06;


ICSSC = 0x80;


I've selected the internal clock reference and enabled it. The MCU runs, but I don't know at what speed it's running at.


I also select the FLL out.


I can't understand at all how this module works. I know I've got the TRIM register in order to reduce/increase the internal clock period, but starting from what value?


And I need the reference to be between 31.25kHz and  39.0625kHz to use the DCO, is that right? If so, how can I set the internal clock to run at that speed?

And where do I choose the FLL factor?


I've read the AN3499 "Clock Options on the HC9S08 Family" but as I said before, I can't understand it.


Thanks a lot! I'm stuck here!!