BL702/704/706 Reference Manual
6.3.2 DMA channel configuration
DMA supports 8 channels in total, each channel does not interfere with each other and can run at the same time. The
following is the configuration process of DMA channel x:
1. Set 32-bit source address in DMA_C0SrcAddr register
2. Set the 32-bit target address in the DMA_C0DstAddr register
3. Configure SI (source) and DI (destination) in the DMA_C0Control register to set whether to enable the automatic
address accumulation mode. When set to 1, enable the automatic address accumulation mode
4. Set the transmission data width by configuring the STW (source) and DTW (destination) bits in the DMA_C0Control
register. The width options are single-byte, double-self-knot, and four-byte
5. Burst type, which can be set by configuring the SBS (source) and DBS (destination) bits in the DMA_C0Control
register. The configuration options are Single, INCR4, INCR8, INCR16
6. Special attention should be paid to the configured combination. A single burst cannot exceed 16 bytes
7. Set the data transmission length range: 0-4095
6.3.3 Peripheral support
The SrcPeripheral (source) and DstPeripheral (destination) are configured to determine the peripherals that the current
DMA cooperates with. The relationship is 0-5 : UART / 6-9 : I2C / 10-13 : SPI / 18-21 : I2S / 22 : ADC / 23 : DAC
UART uses DMA to transfer data
UART sends data packets, using DMA method can greatly reduce CPU processing time, so that its CPU resources
are not wasted a lot. Especially when the UART sends and receives a large number of data packets (such as high-
frequency sending and receiving instructions) has obvious advantages.
Taking UART0 transmission as an example, the configuration process is as follows:
1. Set the value of the register DMA_C0Config [SRCPH] bit to 1, that is, set the Source peripheral to UART_TX
2. Set the value of the DMA_C0Config [DSTPH] bit to 0, that is, set the Destination peripheral to UART_RX
I2C uses DMA to transfer data
The configuration is as follows:
1. Set the value of the register DMA_C0Config [SRCPH] bit to 7, that is, set the Source peripheral to I2C_TX
2. Set the value of the DMA_C0Config [DSTPH] bit to 6, that is, set the Destination peripheral to I2C_RX
SPI uses DMA to transfer data
The configuration is as follows:
1. Set the value of the DMA_C0Config [SRCPH] bit to 11, that is, set the Source peripheral to SPI_TX
BL702/704/706 Reference Manual 122/ 375
@2021 Bouffalo Lab