UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
User manual
Rev. 1.3 — 6 July 2012
409 of 1269
NXP Semiconductors
UM10503
Chapter 19: LPC43xx General Purpose DMA (GPDMA) controller
–
The DMA Controller responds with a DMA acknowledge to the destination
peripheral.
–
The terminal count interrupt is generated (this interrupt can be masked).
–
If the CLLI Register is not 0, then reload the CSRCADDR, CDESTADDR, CLLI,
and CCONTROL Registers and go to back to step 2. However, if CLLI is 0, the
DMA stream is disabled and the flow sequence ends.
19.8.2.3 Memory-to-memory DMA flow
For a memory-to-memory DMA flow the following sequence occurs:
1. Program and enable the DMA channel.
2. Transfer data whenever the DMA channel has the highest pending priority and the
DMA Controller gains mastership of the AHB bus.
3. If an error occurs while transferring the data, generate an error interrupt and disable
the DMA stream.
4. Decrement the transfer count.
5. If the count has reached zero:
–
Generate a terminal count interrupt (the interrupt can be masked).
–
If the CLLI Register is not 0, then reload the CSRCADDR, CDESTADDR, CLLI,
and CCONTROL Registers and go to back to step 2. However, if CLLI is 0, the
DMA stream is disabled and the flow sequence ends.
Note:
Memory-to-memory transfers should be programmed with a low channel priority,
otherwise other DMA channels cannot access the bus until the memory-to-memory
transfer has finished, or other AHB masters cannot perform any transaction.
19.8.3 Interrupt requests
Interrupt requests can be generated when an AHB error is encountered or at the end of a
transfer (terminal count), after all the data corresponding to the current LLI has been
transferred to the destination. The interrupts can be masked by programming bits in the
relevant CCONTROL and CCONFIG Channel Registers. Interrupt status registers are
provided which group the interrupt requests from all the DMA channels prior to interrupt
masking (RAWINTTCSTAT and RAWINTERRSTAT), and after interrupt masking
(INTTCSTAT and INTERRSTAT). The INTSTAT Register combines both the INTTCSTAT
and INTERRSTAT requests into a single register to enable the source of an interrupt to be
quickly found. Writing to the INTTCCLEAR or the INTERRCLR Registers with a bit set
HIGH enables selective clearing of interrupts.
19.8.3.1 Hardware interrupt sequence flow
When a DMA interrupt request occurs, the Interrupt Service Routine needs to:
1. Read the INTTCSTAT Register to determine whether the interrupt was generated due
to the end of the transfer (terminal count). A HIGH bit indicates that the transfer
completed. If more than one request is active, it is recommended that the highest
priority channels be checked first.
2. Read the INTERRSTAT Register to determine whether the interrupt was generated
due to an error occurring. A HIGH bit indicates that an error occurred.
3. Service the interrupt request.