
BL602/604 Reference Manual
UART Clock
160M
Start
Stop
1389
1389
1389
Baud rate
˖
115200 = 160M/1389
Baud rate
˖
9600 = 160M/16667
16667
16667
Sampling Time 8834
16667
Start
Figure 10.3: UART sample
10.3.5 Transmitter
The transmitter contains a 32-byte transmit FIFO to store the data to be transmitted. Software can write the TX FIFO
through the APB bus, and can also move data into the TX FIFO through DMA. When the transmit enable bit is set,
the data stored in the FIFO will be output from the TX pin. Software can choose to transfer data into TX FIFO through
two methods: DMA or APB bus.
Software can check the status of the transmitter by querying the TX FIFO remaining free space count value in bit
<TX_FIFO_CNT> of the register UART_FIFO_CONFIG_1. The transmitter’s FreeRun mode is as follows:
• If the FreeRun mode is not turned on, the transmission behavior is terminated and an interrupt is generated when
the transmission byte reaches the specified length. If you want to continue the transmission, you need to turn it
off and then enable the transmission enable bit.
• If the FreeRun mode is turned on, the transmitter will transmit when there is data in the TX FIFO, and the transmitted
byte will not terminate when it reaches the specified length.
10.3.6 receiver
The receiver contains a 32-byte receive FIFO to store the received data. Software can check the status of the receiver
by querying the RX FIFO available data count value through the bit <RX_FIFO_CNT> in the register UART_FIFO_-
CONFIG_1. The lower 8 bits of the URX_RTO_TIMER register are used to set a receive timeout threshold. When the
receiver does not receive data beyond this time value, an interrupt will be triggered. Bits <CR_URX_DEG_EN> and
BL602/604 Reference Manual
129/ 195
@2020 Bouffalo Lab