Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
139
/
631
APB
Peripheral
APB read to AHB write, single transfer
Circular mode
The circular mode is used to process circular buffers and continuous data transmission (such as ADC scan mode).
The DMA_CHCFGx.CIRC is used to enable this function. When the cyclic mode is activated, if the number of data
to be transferred becomes 0, it will automatically be restored to the initial value when configuring the channel, and
the DMA operation will continue.
If the user wants to turn off the circular mode, the user needs to write 0 to DMA_CHCFGx.CHEN to disable the
DMA channel, and then write 0 to DMA_CHCFGx.CIRC (when DMA_CHCFGx.CHEN is 1, other bits in the
DMA_CHCFGx register cannot be rewritten).
Error management
DMA access to a reserved address area will cause DMA transmission errors. When an error occurs, the transfer error
flag is set, and the hardware automatically clears the current DMA channel enable bit (DMA_CHCFGx.CHEN), and
the channel operation is stopped. If the transfer error interrupt enable bit is set in the DMA_CHCFGx register, an
interrupt will be generated.
Interrupt
Transfer complete interrupt:
An interrupt is generated when channel data transfer is complete. Interrupt is a level signal. Each channel has
its dedicated interrupt, interrupt mask control and interrupt status bit. interrupt status bit is cleared when interrupt
flag clear bit is set.
Half transfer interrupt:
An interrupt is generated when half of the channel data is transferred. Interrupt is a level signal. Each channel
has its dedicated interrupt, interrupt mask control and interrupt status bit. interrupt status bit is cleared when
interrupt flag clear bit is set.
Transfer error interrupt:
An interrupt is generated when bus returned error. Interrupt is a level signal. Each channel has its dedicated
interrupt, interrupt mask control and interrupt status bit. interrupt status bit is cleared when interrupt flag clear
bit is set.
Table 7-3 DMA interrupt request
Interrupt event
Event flag bit
Enable control bit
Half transfer
HTXF
HTXIE
Transfer complete
TXCF
TXCIE
Transfer error
ERRF
ERRIE