Baud Rate Generator - Baud Rate Generator - 1.15 English - UG585

Zynq 7000 SoC Technical Reference Manual (UG585)

Document_ID
UG585
Release_Date
2026-02-06
Version
1.15 English

The baud rate generator furnishes the bit period clock, or baud rate clock, for both the receiver and the transmitter. The baud rate clock is implemented by distributing the base clock uart_clk and a single cycle clock enable to achieve the effect of clocking at the appropriate frequency division. The effective logic for the baud rate generation is shown in the following figure.

Figure 1. UART Board Rate Generator

The baud rate generator can use either the master clock signal, uart_ref_clk, or the master clock divided by eight, uart_ref_clk/8. The clock signal used is selected according to the value of the CLKS bit in the Mode register (uart.mode_reg0). The resulting selected clock is termed sel_clk in the following description.

The sel_clk clock is divided down to generate three other clocks: baud_sample, baud_tx_rate, and baud_rx_rate. The baud_tx_rate is the target baud rate used for transmitting data. The baud_rx_rate is nominally at the same rate, but gets resynchronised to the incoming received data. The baud_sample runs at a multiple ([BDIV] + 1) of baud_rx_rate and baud_tx_rate and is used to over-sample the received data.

The sel_clk clock frequency is divided by the CD field value in the Baud Rate Generator register to generate the baud_sample clock enable. This register can be programmed with a value between 1 and 65535.

The baud_sample clock is divided by [BDIV] plus 1. BDIV is a programmable field in the Baud Rate Divider register and can be programmed with a value between 4 and 255. It has a reset value of 15, inferring a default ratio of 16 baud_sample clocks per baud_tx_clock / baud_rx_rate.

Thus the frequency of the baud_sample clock enable is shown in the following equation.
The frequency of the baud_rx_rate and baud_tx_rate clock enables is shown in the following equation.
Important: It is essential to disable the transmitter and receiver before writing to the Baud Rate Generator register (uart.Baud_rate_gen_reg0), or the baud rate divider register (uart.Baud_rate_divider_reg0). A soft reset must be issued to both the transmitter and receiver before they are re-enabled.

Some examples of the relationship between the uart_ref_clk clock, baud rate, clock divisors (CD and BDIV), and the rate of error are shown in the following table. The highlighted entry shows the default reset values for CD and BDIV. For these examples, a system clock rate of UART_Ref_Clk = 50 MHz and Uart_ref_clk/8 = 6.25 MHz is assumed. The frequency of the UART reference clock can be changed to get a more accurate Baud rate frequency, refer to Clocks for details to program the UART_Ref_Clk.

Table 1. UART Parameter Value Examples
Clock Baud Rate Calculated CD Actual CD BDIV Actual Baud Rate Error (BPS) % Error
UART Ref clock 600 10416.667 10417 7 599.980 0.020 -0.003
UART Ref clock /8 9,600 81.380 81 7 9,645.061 45.061 0.469
UART Ref clock 9,600 651.041 651 7 9,600.614 0.614 0.006
UART Ref clock 28,800 347.222 347 4 28,818.44 18.44 0.064
UART Ref clock 115,200 62.004 62 6 115,207.37 7.373 0.0064
UART Ref clock 230,400 31.002 31 6 230,414.75 14.75 0.006
UART Ref clock 460,800 27.127 9 11 462,962.96 2,162.96 0.469
UART Ref clock 921,600 9.042 9 5 925,925.92 4,325.93 0.469