RL78/G11 UART Reception in STOP Mode Using Middle-speed On-chip Oscillator IAR
R01AN3634EJ0100 Rev.1.00 Page 14 of 85
Feb. 15, 2017
Table 5.2 Measurement Results of MOCO Waveform Divided by N
MOCO (4 MHz±12%)
min: 3.52 MHz Typ: 4.00 MHz Max: 4.42 MHz
HOCO
(24 MHz±1%)
Max: 24.24 MHz (24.24 / 3.52) N =
6.886N
(24.24 / 4.00) N =
6.060N
(24.24 / 4.42) N =
5.484N
Typ: 24.00 MHz (24.00 / 3.52) N =
6.818N
(24.00 / 4.00) N =
6.000N
(24.00 / 4.42) N =
5.430N
min: 23.76 MHz (23.76 / 3.52) N =
6.750N
(23.76 / 4.00) N =
5.940N
(23.76 / 4.42) N =
5.376N
As Table 5.2 shows, the measurement results produce the largest count value when MOCO is 3.52MHz and HOCO is
24.24MHz. Therefore, N can be calculated using the following expressions.
(24.24 / 3.52) N < 65535
N < 65535 * 3.52 / 24.24
N < 9516.633
∴ N (Max) = 9516
The TDR01 register should be set to a half cycle of the waveform to be measured. Therefore, set the value as follows
and confirm the r_tau0_baudrate_correction function.
Value to set to TDR01 = N/2-1
= 4757 (0x1295)