r5f21368sdfp Renesas Electronics Corporation., r5f21368sdfp Datasheet - Page 391

no-image

r5f21368sdfp

Manufacturer Part Number
r5f21368sdfp
Description
Renesas Mcu R8c Family / R8c/3xt-a Series
Manufacturer
Renesas Electronics Corporation.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
r5f21368sdfp#V0
Manufacturer:
Renesas Electronics America
Quantity:
10 000
Under development
R8C/36T-A Group
R01UH0240EJ0001 Rev.0.01
Apr 28, 2011
18.3.4.4
The following shows examples of setting correction by the automatic correction function and correction by
software.
These examples apply under the assumptions:
• External sub oscillator frequency fsub = 32,769.55 Hz
• External sub oscillator frequency error foffsub = (32,769.55 – 32,768)/32,768 × 10
(1) Example of setting correction by the automatic correction function
(2) Example of setting correction by software
The AADJE bit in the TRECR register = 1 (automatic correction function enabled (correction by software
disabled)).
• When the AADJM bit in the TRECSR register = 0 (corrected every minute), the correction amount is
• When the AADJM bit in the TRECSR register = 1 (corrected every 10 seconds), the correction amount is
The AADJE bit = 0 (automatic correction function disabled (correction by software enabled)).
• The minimum correction amount when writing to the TREADJ register every second is ±1/32,768 =
• If the correction amount when writing to the TREADJ register every second (writing every second) is A,
expressed as follows:
Correction amount = (fsub – 32,768) × 60 = 93  63 (maximum setting value of bits ADJ0 to ADJ5)
Thus, automatic correction cannot be performed every minute.
expressed as follows:
Correction amount = (fsub – 32,768) × 10 = 15.5  16
Thus, set the TREADJ register to 01010000b (MINUS correction, correction amount = 16).
Clock errors after correction (unit: ppm)
= ((fsub × 10 – 16)/(32,768 × 10) – 1) × 10
= -1.5 ppm (slower than the standard clock by 1.5 ppm)
±30.5 ppm, and the minimum correction amount when writing to the TREADJ register every minute is
±1/32,768/60 = ±0.5 ppm, so corrections every second and every minute are combined to be used.
and the correction amount when writing to the TREADJ register every minute (writing every minute) is
B,
A = [fsub – 32,768] = [1.55] = 1 ([ ] indicates a calculation that results in an integer.)
B = A + (((fsub – 32,768) × 60) % 60) = A + (93 % 60) = 34
(% indicates a calculation that results in a remainder of the division.)
Thus, correction is performed by writing 01000001b (41h) every second and 01100010b (62h) every
minute to the TREADJ register.
Clock errors after correction (unit: ppm)
= (((fsub – A) × 59 + (fsub – B))/(32,768 × 60) – 1) × 10
= 0 ppm
Preliminary document
Specifications in this document are tentative and subject to change.
Examples of Setting Clock Error Correction Function
6
6
6
= 47.3 ppm
Page 360 of 725
18. Timer RE2

Related parts for r5f21368sdfp