EasyManua.ls Logo

Bouffalo Lab BL702 - Page 195

Default Icon
375 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
BL702/704/706 Reference Manual
10.3.9 DMA transfer mode
UART supports DMA transfer mode. To use this mode, you need to set the thresholds of TX and RX FIFO through
the bits <TFITH> and <RFITH> of the register UART_FIFO_CONFIG_1. When this mode is enabled, the UART will
check the TX/RX FIFO. Once the TX/RX FIFO available count value is greater than its set threshold, a DMA request
will be initiated, and the DMA will move the data to the TX FIFO or out of the RX FIFO according to the setting.
10.3.10 UART interrupt
UART has a wealth of interrupt control, including the following interrupt modes:
• TX transmission end interrupt
• RX transmission end interrupt
• TX FIFO request interrupt
• RX FIFO request interrupt
• RX timeout interrupt
• RX parity error interrupt
• TX FIFO overflow interrupt
• RX FIFO overflow interrupt
• RX LIN mode synchronization field (SYNC Field) error interrupt
TX and RX can respectively set a transmission length value through the upper 16 bits of the UTX_CONFIG and URX_-
CONFIG registers. When the number of bytes transmitted reaches this value, the corresponding TX/RX transmission
end interrupt will be triggered.
The TX/RX FIFO request interrupt will be triggered when the available FIFO count value is greater than the threshold
set in the register UART_FIFO_CONFIG_1, and the interrupt flag will be automatically cleared when the condition is
not met.
The RX timeout interrupt will be triggered when the receiver exceeds the timeout threshold without receiving data,
and the RX parity error interrupt will occur when a parity error occurs. If the TX/RX FIFO overflows or underflows, the
corresponding overflow interrupt will be triggered.
When the FIFO clear bit TFICLR/RFICLR is set to 1, the corresponding FIFO will be cleared and the overflow interrupt
flag will be automatically cleared. When the LIN mode is enabled, the synchronization field (SYNC Field) should be
0x55 according to the protocol. Therefore, when the received data is not 0x55, the synchronization field error interrupt
is triggered.
The interrupt status can be inquired through the register UART_INT_STS, and the interrupt can be cleared by writing
1 to the corresponding bit of the register UART_INT_CLEAR.
BL702/704/706 Reference Manual 195/ 375
@2021 Bouffalo Lab
guest@bouffalolab

Table of Contents