GD32W51x User Manual
333
access error interrupt, single-data mode exception interrupt, and FIFO error and exception
interrupt. A DMA channel interrupt may be produced when any interrupt event occurs on the
channel.
Each interrupt event has a dedicated flag bit in the DMA_INTF0 or DMA_INTF1 register, a
dedicated clear bit in the DMA_INTC0 and DMA_INTC1 register, and a dedicated enable bit
in the DMA_CHxCTL and CHxFCTL register, as described in the
Table 12-6. DMA interrupt events
Interrupt event
Flag bit
Enable bit
Clear bit
DMA_INTF0 or
DMA_INTF1
DMA_CHxCTL or
DMA_CHxFCTL
DMA_INTC0 or
DMA_INTC1
Full transfer finish
FTFIF
FTFIE
FTFIFC
Half transfer finish
HTFIF
HTFIE
HTFIFC
Transfer access error
TAEIF
TAEIE
TAEIFC
Single-data mode
exception
SDEIF
SDEIE
SDEIFC
FIFO error and
exception
FEEIF
FEEIE
FEEIFC
These five events can be divided into three types:
Flag: Full transfer finish flag and half transfer finish flag
Exception: Single-data mode exception and FIFO exception
Error: Transfer access error and FIFO error
When the exception events occur, the DMA transmission is not affected and continues
transferring normally. When the error events are detected, the DMA transmission is stopped.
These three types of event are described in detail in the following sections.
12.5.1.
Flag
Two flag events are supported, including full transfer finish flag and half transfer finish flag.
The full transfer finish flag is asserted, when one of the following situations occurs:
The CNT bits reach to zero when DMA is the transfer flow controller.
When peripheral is the transfer flow controller, the last request is responded completely
and the contents of the FIFO are entirely written into the memory in peripheral-to-memory
mode.
When the channel is disabled by software before the end of the transfer, the current
memory and peripheral is completed and the contents of the FIFO are entirely written
into the memory in peripheral-to-memory or memory-to-memory mode.