English
Language : 

MC9S08DZ128 Datasheet, PDF (196/458 Pages) Freescale Semiconductor, Inc – Microcontrollers
Chapter 8 Multi-Purpose Clock Generator (S08MCGV2)
trimming approach to search for the best trim value is recommended. In Example #4: Internal Reference
Clock Trim later in this section, this approach will be demonstrated.
If a user specified trim value has been found for a device (to replace the factory trim value), this value can
be stored in FLASH memory to save the value. If power is removed from the device, the IRC can easily
be re-trimmed to the user specified value by copying the saved value from FLASH to the MCG registers.
Freescale identifies recommended FLASH locations for storing the trim value for each MCU. Consult the
memory map in the data sheet for these locations.
8.5.4.1 Example #4: Internal Reference Clock Trim
For applications that require a user specified tight frequency tolerance, a trimming procedure is provided
that will allow a very accurate internal clock source. This section outlines one example of trimming the
internal oscillator. Many other possible trimming procedures are valid and can be used.
In the example below, the MCG trim will be calibrated for the 9-bit MCGTRM and FTRIM collective
value. This value will be referred to as TRMVAL.
MC9S08DZ128 Series Data Sheet, Rev. 1
196
Freescale Semiconductor