BL602/604 Reference Manual
3//
FCLK
160M
hbn_uart_clk_sel
'LYLGHU
8$57
Figure 10.2: UART clock
10.3.4 Baud rate setting
The user can generate the required baud rate by setting the register UART_BIT_PRD. The upper 16 bits and lower 16
bits of this register correspond to RX and TX respectively, that is, the baud rates of RX and TX can be set independently.
The 16-bit value needs It is calculated that the formula is as follows:
Baud rate = UART clock / (16-bit coeff 1)
That is: 16-bit coefficient = UART clock / baud rate -1
The meaning of the 16-bit coefficient is the count value obtained by counting the current baud rate bit width with the
UART clock. Because the maximum 16-bit coefficient is 65535, the minimum baud rate supported by the UART is:
UART clock / 65536. The maximum baud rate supported by the UART is 10Mbps.
Before the UART samples the data, it will first filter the data to filter out the glitches in the waveform. Sampling
is then performed at the intermediate value of the above 16-bit coefficients, so that different sampling times are
adjusted according to different baud rates to keep the median value always being taken, greatly improving flexibility
and accuracy. The sampling process is shown in the following figure:
BL602/604 Reference Manual
128/ 195
@2020 Bouffalo Lab