Datasheet
Internal Clock Generator (S08ICGV2)
MC9S08GB60A Data Sheet, Rev. 2
Freescale Semiconductor 123
Figure 7-11. Trim Procedure
In this particular case, the MCU has been attached to a PCB and the entire assembly is undergoing final
test with automated test equipment. A separate signal or message is provided to the MCU operating under
user provided software control. The MCU initiates a trim procedure as outlined in Figure 7-11 while the
tester supplies a precision reference signal.
If the intended bus frequency is near the maximum allowed for the device, it is recommended to trim using
a reduction divisor (R) twice the final value. Once the trim procedure is complete, the reduction divisor
can be restored. This will prevent accidental overshoot of the maximum clock frequency.
7.5 ICG Registers and Control Bits
Refer to the direct-page register summary in Chapter 4, “Memory” of this data sheet for the absolute
address assignments for all ICG registers. This section refers to registers and control bits only by their
names. A Freescale-provided equate or header file is used to translate these names into the appropriate
absolute addresses.
Initial conditions:
1) Clock supplied from ATE has 500 μs duty period
2) ICG configured for internal reference with 4 MHz bus
START TRIM PROCEDURE
CONTINUE
CASE STATEMENT
COUNT > SZZEXPECTED = 500
.
MEASURE
INCOMING CLOCK WIDTH
ICGTRM = $80, n = 1
COUNT < EXPECTED = 500
COUNT = EXPECTED = 500
STORE ICGTRM VALUE
IN NON-VOLATILE
MEMORY
ICGTRM =
ICGTRM =
ICGTRM - 128 / (2**n)
ICGTRM + 128 / (2**n)
n = n + 1
(COUNT = # OF BUS CLOCKS / 4)
(DECREASING ICGTRM
INCREASES THE FREQUENCY)
(INCREASING ICGTRM
DECREASES THE FREQUENCY)
NO
YES
IS n > 8?
(RUNNING TOO SLOW)
(RUNNING TOO FAST)
