User's Manual

Table Of Contents
UART S3C2450X RISC MICROPROCESSOR
15-10
2.1.10 Baud-rate Generation
Each UART's baud-rate generator provides the serial clock for the transmitter and the receiver. The source clock
for the baud-rate generator can be selected with the S3C2450's internal system clock(PCLK or divided EPLL
clock) or EXTUARTCLK. UARTCLK (Clock frequencies of 16 times the baud rate) are used for sampling serial
data to minimize error. UARTCLK is generated by dividing the source clock. The baud-rate clock is generated by
dividing the UARTCLK by 16.
The value stored in the baud rate divisor register (UBRDIVn) and dividing slot register(UDIVSLOTn), are used to
determine the serial Tx/Rx clock rate (baud rate) as follows:
DIV_VAL = (SRCCLK / UARTCLK ) –1
= {SRCCLK / (baud rate x 16 ) } –1
=UBRDIVn + (num of 1’s in UDIVSLOTn)/16
(SRCCLK : PCLK, EXTUARTCLK or divided EPLL clock)
Where, Integer part of DIV_VAL should be from 1 to (2
16
-1), but can be set zero when SRCCLK is EXTUARTCLK
or divided EPLL clock. (Please refer the Figure 15-3 by this effect)
Using UDIVSLOT which is the factor of floating point divisor, you can make more accurate baud rate. (when
UBRDIVn is 0, floating part will not be affected.)
For example, if the baud rate is 115200 bps and SRCCLK is 40 MHz, UBRDIVn and UDIVSLOTn are :
DIV_VAL = {40000000 / (115200 x 16)} -1
= 21.7 -1 (actual dividing value is 21.7)
= 20.7 (for register setting, 20.7 is needed here)
* UBRDIVn = 20 ( integer part of DIV_VAL )
(num of 1’s in UDIVSLOTn)/16 = 0.7
(num of 1’s in UDIVSLOTn) = 11
* UDIVSLOTn = 0xEEEA(1110_1110_1110_1010b), 0xDDD5(1101_1101_1101_1010b) or etc.
( floating point part of DIV_VAL )
As a result, DIV_VAL = 20.6875
We recommend to select UDIVSLOTn in the Table 15-4 (at 23 page). For convenience, summary of Table is
presented below.
Floating
point part
Num of
1’s
UDIVSLOTn
Floating
point part
Num of
1’s
UDIVSLOTn
0 0 0x0000 0.5 8 0x5555
0.0625 1 0x0080 0.5625 9 0xD555
0.125 2 0x0808 0.625 10 0xD5D5
0.1875 3 0x0888 0.6875 11 0xDDD5
0.25 4 0x2222 0.75 12 0xDDDD
0.3125 5 0x4924 0.8125 13 0xDFDD
0.375 6 0x4A52 0.875 14 0xDFDF
0.4375 7 0x54AA 0.9375 15 0xFFDF