Datasheet
Section 17 Subsystem Timer (Subtimer)
Rev. 4.00 Mar. 15, 2006 Page 384 of 556
REJ09B0026-0400
Formula (1)
2T
RO
= t × n
The division ratio of the on-chip oscillator to make the subclock be the setting cycle can be
obtained by the following formula.
Formula (2)
k =
× T
SUB
==
2
T
RO
T
SUB
t
× n
2 × T
SUB
t
× n
In the subtimer, relationship between the setting values in ROPCR and the division ratio is as
follows.
Formula (3)
k = 2 (m + 2) (Note that m ≥ 0)
Then the setting value m in ROPCR can be obtained by assigning the value k obtained by formula
(2) to formula (3).
Formula (4)
−
2 (Note that m ≥ 0)
m =
T
SUB
t × n
The cycle to be actually used as the subclock is as follows.
T
CAL
= 2 (m + 2)
× T
RO
Formula (5)
Therefore, the rounding error between the expected value and the setting value of the subclock
cycle can be obtained by the following formula.
Formula (6)
σ =
× 100 (%) = 1−
× 100 (%)
K
× t × n
T
SUB
T
SUB
− T
CAL
2 × T
SUB
[Legend]
t: System clock cycle
n: SBTPS count value (for two cycles)
T
RO
: On-chip oscillator cycle (calculated value)
T
CAL
: Subclock cycle (calculated value)
T
SUB
: Subclock setting cycle (expected value)
k: Division ratio for oscillation cycle of on-chip oscillator and subclock setting cycle
m: ROPCR setting value










