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!!
Hi.
I will tell you my personal experience using MCF51QE128 and also some other microcontrollers of HCS08 Family,
I prefer to use device initialization module when I create a new project, they have a usefull and painless way to set settings clock.
1. When you start wizard project, select Device initialization, in the Processor Expert Settings.
2. In the Window of Device Initialization, select CPU on your CHIP.
3. In the Inspector Window, expand Clock Settings and choose your desired bus clock, click OK, and finally on your Device Initialization Window click on Generate Code.
Hi,thanks for your reply!
Well, thats pocessor expert right?... I personally don't like that way of programming... Because I wouldn't finally understand how it works.
Don't you know what's the nominal speed of the internal reference clock? and at what trim level?
Thanks again!