HCS12 clock speed

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

HCS12 clock speed

3,288 Views
Bee
Contributor III
Is there an easy (straightforward) way to tell what clock frequency the S12 is using? I don't want to rely on an external event, like a set of interrupts. I would like to set the PLL clock speed from this info so that it does not exceed the max. In this system, the input clock can change by jumpers for other reasons.

Thanks.
Labels (1)
0 Kudos
3 Replies

800 Views
VincentV
Contributor I
If you don't have an external clock tied to it, is it not for certain running at 16MHz?
0 Kudos

800 Views
Alban
Senior Contributor II
Hi IronTek,
 
If you don't have an external clock, you can run in Self Clock Mode. However its real frequency is not known, an indication is given in the datasheet in the electrical characteristics.
 
Hi Bee,
 
The external clock is the absolute timing reference of the microcontroller. By itself only, the MCU is not able to determine at which frequency it is running.
The only way to determine the clocking speed is to have another reference like a PWM (or another regular known signal) watched by one of the TIMERs. By the number of counts in the timer, you will be able to calculate the bus/oscillator speed.
 
Cheers,
Alban.
0 Kudos

800 Views
Bee
Contributor III
Thanks, Alban. I was afraid of that being the case. Was hoping there was some 'backdoor' method that I haven't thought of which might give a clue to the clock speed. The PWM method sounds like the only way but that costs another 'clock' type of signal to invent/produce. I will consider the expense.

Thanks again.

-Al-
0 Kudos