Samsung S3C2416 User Manual page 330

16/32-bit risc
Table of Contents

Advertisement

UART
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 S3C2416'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
or divided EPLL clock. (Please refer the Figure 14-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
* 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.
As a result, DIV_VAL = 20.6875
We recommend to select UDIVSLOTn in the Table 14-4 (at 23 page). For convenience, summary of Table is
presented below.
Floating
Num of
point part
1's
0
0
0.0625
1
0.125
2
0.1875
3
0.25
4
0.3125
5
0.375
6
0.4375
7
14-10
(for register setting, 20.7 is needed here)
( floating point part of DIV_VAL )
UDIVSLOTn
0x0000
0x0080
0x0808
0x0888
0x2222
0x4924
0x4A52
0x54AA
16
-1), but can be set zero when SRCCLK is EXTUARTCLK
Floating
Num of
point part
1's
0.5
0.5625
0.625
10
0.6875
11
0.75
12
0.8125
13
0.875
14
0.9375
15
S3C2416X RISC MICROPROCESSOR
UDIVSLOTn
8
0x5555
9
0xD555
0xD5D5
0xDDD5
0xDDDD
0xDFDD
0xDFDF
0xFFDF

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents