CHAPTER 2-3: High-Speed CR Trimming
FM4 Peripheral Manual, Doc. No. 002-04856 Rev. *E 119
Figure 4-2 Method to Trim High-speed CR Clock
Note:
− For information about how to measure Tmin_coarse/fine and Tmax_coarse/fine, see " Example
of Trimming Data Acquisition Using Base Timer".
Example of Trimming Data Acquisition Using Base Timer
Figure 4-3 shows the time chart of high-speed CR oscillation and the trimming process.
Figure 4-3 Time Chart of High-speed CR Oscillation and the Trimming Process with Base Timer
Run the base timer by setting the main oscillation clock (CLKMO) as the master clock (measurement
reference clock).
Activate a trigger on the rising of the high-speed CR frequency division clock (CLKHC_div) when setting
Xtrmmin or Xtrmmax, read the base timer value at that time, and perform the following calculations.
Tmax = (TIMER1×PCLK) / DIV
Tmin = (TIMER2×PCLK) / DIV
− TIMER1, TIMER2: Count value of base timer (PWC)
− PCLK: APB1 bus clock
− DIV: Frequency division ratio set by CSR bit of Division Setting
Register(MCR_PSR)