CHAPTER 2-3: High-Speed CR Trimming
116 FM4 Peripheral Manual, Doc. No. 002-04856 Rev. *E
3. High-Speed CR Trimming Function Operation
This section explains operation conducted by frequency trimming function of the high-speed CR
oscillator.
Operation of High-speed CR Oscillation Frequency Trimming Function
Frequency trimming setup
The setup process writes a trimming data value to the High-speed CR oscillation Frequency Trimming
Register (MCR_FTRM) to correct the misalignment of high-speed CR clock accuracy caused by process
variation.
Temperature trimming setup
The setup process writes a trimming data value to the High-speed CR oscillation Temperature Trimming
Register (MCR_TTRM) to correct the misalignment of high-speed CR clock accuracy caused by
temperature change.
Register lock function
Write protect function is provided for the High-speed CR oscillation Frequency Trimming Register
(MCR_FTRM) and the High-speed CR oscillation Temperature Trimming Register (MCR_TTRM), a
function that protects the register from being rewritten without authorization when the system runs out of
control.
Trimming data acquisition
Data written to the High-speed CR oscillation Frequency Trimming Register (MCR_FTRM) can be
acquired by one of the following three methods:
− Use the factory preset value stored in the CR trimming area inside the flash memory.
After reset is released, the value in the CR trimming area inside the flash memory is stored in the
CR Trimming Data Mirror Register (CRTRMM). For data written to the High-speed CR oscillation
Frequency Trimming Register (MCR_FTRM) , use the TRMM bits of CR Trimming Data Mirror
Register (CRTRMM).
− Calculate by yourself the value set to the High-speed CR oscillation Frequency Trimming Register
from the count value within a certain period by using base timer.
− Output high-speed CR clock to an external pin, monitor the waveform to trim the frequency and
calculate by yourself the value set to the High-speed CR oscillation Frequency Trimming Register.
Data written to the High-speed CR oscillation Temperature Trimming Register (MCR_TTRM) can be
acquired by the following method:
− Use the factory preset value stored in the CR trimming area inside the flash memory.
After reset is released, the value in the CR trimming area inside the flash memory is stored in the CR
Trimming Data Mirror Register (CRTRMM). For data written to the High-speed CR oscillation
Temperature Trimming Register (MCR_TTRM), use the TTRM bits of CR Trimming Data Mirror
Register (CRTRMM).
Notes:
− Erasing the flash memory also erases the CR trimming area inside the memory at the same time.
If you use a value in the CR trimming area, therefore, save the data to other area (such as RAM)
before erasing the flash memory, or only erase sectors other than in the CR trimming area.
− For the address of the CR trimming area, see Flash Programming Manual of the product used.