Fujitsu FR81S User Manual

Page of 2342
CHAPTER 40: MULTI-FUNCTION SERIAL INTERFACE 
 
 
5. Operation of UART 
 
FUJITSU SEMICONDUCTOR LIMITED 
CHAPTER : MULTI-FUNCTION SERIAL INTERFACE 
FUJITSU SEMICONDUCTOR CONFIDENTIAL 
167 
5.2.13. 
UART Baud Rate Selection/Setting 
The UART transmission/reception baud rate generator can be configured for the settings below. 
 Baud rate obtained when a dedicated baud rate generator (reload counter) 
divides the frequency of the internal clock 
There are two internal reload counters that correspond to the transmission and reception serial clocks, 
respectively. The baud rate can be selected by setting a 15-bit reload value in the baud rate generator 
register (BGR). 
The reload counter divides the internal clock with the set value. 
To configure the clock source, select the internal clock (BGR:EXT=0). 
 
 Baud rate obtained when a dedicated baud rate generator (reload counter) 
divides the frequency of the external clock 
Use the external clock for the clock source of reload counter. The baud rate can be selected by setting a 
15-bit reload value in the baud rate generator register (BGR).   
The reload counter divides the external clock with the set value.   
To configure the clock source, select the external clock and the baud rate generator clock (BGR:EXT=1). 
This mode is designed to accommodate the case where the division of an oscillator of a special frequency is 
used. 
Notes: 
  Configure the external clock (EXT=1) after stopping the reload counter (BGR=15
´
 h00). 
  When an external clock (EXT=1) has been set, the "H" width and "L" width of the external clock should 
be set to 2 bus clocks or more. 
 
 Baud Rate Calculation 
Set two 15-bit reload counters in the baud rate generator register (BGR). 
The baud rate calculation formulas are as follows: 
(1) Reload value 
V = φ / b 
 1 
V: Reload value 
b: Baud rate 
φ
: Bus clock frequency, external clock frequency 
(2) Example of calculation 
Reload values when setting the bus clock frequency at 16 MHz, usage of internal clock, and baud rate at 
19200 bps are as follows: 
Reload value: 
V = (16 ∗ 1,000,000) / 19200 − 1 = 832 
The baud rate is: 
b = (16 ∗ 1,000,000) / (832+1) = 19208 bps 
(3) Baud rate error 
The baud rate error can be obtained using the following formula: 
Error (%) = (calculated value - desired value) / desired value ∗ 100 
MB91520 Series
MN705-00010-1v0-E
1480