UART
S3C2416X RISC MICROPROCESSOR
14-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 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
=U (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 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 (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 14-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
Summary of Contents for S3C2416
Page 122: ...BUS MATRIX EBI S3C2416X RISC MICROPROCESSOR 3 4 NOTES ...
Page 204: ...DMA CONTROLLER S3C2416X RISC MICROPROCESSOR 8 18 NOTES ...
Page 284: ...WATCHDOG TIMER S3C2416X RISC MICROPROCESSOR 11 6 NOTES ...
Page 320: ...REAL TIME CLOCK S3C2416X RISC MICROPROCESSOR 13 16 NOTES ...
Page 344: ...UART S3C2416X RISC MICROPROCESSOR 14 24 NOTES ...
Page 380: ...USB2 0 DEVICE S3C2416X RISC MICROPROCESSOR 16 34 NOTES ...
Page 432: ...2D S3C2416X RISC MICROPROCESSOR 18 38 NOTES ...
Page 446: ...HS_SPI CONTROLLER S3C2416X RISC MICROPROCESSOR 19 14 NOTES ...
Page 604: ...S3C2416X RISC MICROPROCESSOR S3C2416X RISC MICROPROCESSOR 23 22 NOTES ...
Page 638: ...PCM AUDIO INTERFACE S3C2416X RISC MICROPROCESSOR 25 18 NOTES ...
Page 670: ...ELECTRICAL DATA S3C2416X RISC MICROPROCESSOR 26 32 NOTES ...