How to know what´s the bus frequency of my MCU - Using DEMOQE128 board and MCF51qe

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

How to know what´s the bus frequency of my MCU - Using DEMOQE128 board and MCF51qe

Jump to solution
1,767 Views
jreyes085
Contributor I

Hi,

 

I want to know How to know what´s the bus frequency of my MCU - Using DEMOQE128 board and MCF51qe...

 

I already programmed this, and made test with the oscilloscope to see the frequency output of a blinking led that the board has...i obviously counted the number of assembly steps that go through..This value was the bus frequency not the ISCOUT..The clocks are like this, first the DCOOUT, then i want to divide by four to have a ISCOUT of 8MHz, and later the bus frequency is predefined as ISCOUT/2 and that will be 4MHz...I dont know if im doing a wrong configuration, please help me....I already have the 4MHz in the bus freq, but im afraid that i did a wrong configuration, because i changed the BDIV bitfields and the bus frequency did not work...

 

#define FTrim_Val 0
#define ICSC1_FEI 0b00000100
#define ICSC2_FEI 0b00010110      //Con los dos primeros cuadro ISCOUT division DCOOUT/1                                                //DCOOUT=8MHz y ISCOUT=4Mhz
#define ICSSC_FEI 0b01000000 | FTrim_Val     //Midrange DCO32Mhz,dmx32=0,,,,Ftrim Default 0

 

I did this changing the BDIV bitfields in the ICSC2 register first from 0b10 (DCOOUT/4) and later with 00 (DCOOUT/1)and the result was the same....a 4MHz MCU frequency...and the command box in the debugger tells me that the MCU speed is 4MHz...

 

Thanks, please help me...

Labels (1)
0 Kudos
1 Solution
752 Views
RichTestardi
Senior Contributor II

Hi,

 

Maybe this will help...  I believe this sequence will output your bus frequency divided by ~1000 to pin ptc0:

 

                    TPM3SC = TPM3SC_CLKSA_MASK;
                    TPM3C0SC = TPM3C0SC_MS0A_MASK;
                    TPM3MODH = 499>>8;
                    TPM3MODL = 499&0xff;
                    TPM3CNTL = 0;
                    TPM3C0SC_ELS0x = 1;
                    TPM3C0VH = 499>>8;
                    TPM3C0VL = 499&0xff;

 

That's how I usually validate I have programmed my clocks correctly -- by dividing them down and sending them off-chip where I can measure them for sure.

 

I just ran the above code on my MCF51QE128 and saw 25kHz.

 

-- Rich

View solution in original post

0 Kudos
6 Replies
753 Views
RichTestardi
Senior Contributor II

Hi,

 

Maybe this will help...  I believe this sequence will output your bus frequency divided by ~1000 to pin ptc0:

 

                    TPM3SC = TPM3SC_CLKSA_MASK;
                    TPM3C0SC = TPM3C0SC_MS0A_MASK;
                    TPM3MODH = 499>>8;
                    TPM3MODL = 499&0xff;
                    TPM3CNTL = 0;
                    TPM3C0SC_ELS0x = 1;
                    TPM3C0VH = 499>>8;
                    TPM3C0VL = 499&0xff;

 

That's how I usually validate I have programmed my clocks correctly -- by dividing them down and sending them off-chip where I can measure them for sure.

 

I just ran the above code on my MCF51QE128 and saw 25kHz.

 

-- Rich

0 Kudos
752 Views
jreyes085
Contributor I
Thanks!
0 Kudos
752 Views
guribe
Contributor I

Hi:

 

  The real questions is: Why may we go to ask through a Forum, such kind of technical data that MUST be in the manuals? Today, 3 years after Rich T's kind advise, I am here looking for the same data (what is THE FFFrequency of the thing), after hours of reading ALL reference manuals, ALL Quick start guides, ALL schematics, ALL User Guides, ALL C examples, ALL asm examples (only ONE...).

 

  Reversing engineering to find out technical details needed to design, is NOT what I am needing to do today.

 

Eng. Luis G. Uribe C.

0 Kudos
752 Views
guribe
Contributor I

And I am NOT a Newbie

0 Kudos
752 Views
iapetus
Contributor I

hehe i came across with the same matter when i was studying at university. Can i ask u a question? are u from Colombia? Xaverian university?

0 Kudos
752 Views
guribe
Contributor I

  YES! 38 años ahora en Caracas. USB primero, empleado luego en empresas de tecnología (Coasin, Autotrol), luego mías en sociedad (Vessing, VT&D, Electriahorro), retirado y... des-retirado después, a mis 65 años, gracias a mis socios! Y tu eres?

 

  Interesante tu observación! Saludos, GUribe (algo desactualizado: http://uribe.tk/ ...)

0 Kudos