Texas Instruments CC2650DK 사용자 설명서

다운로드
페이지 1570
Functional Description
12.3.10 Interrupts and Errors
The
μDMA controller generates a completion interrupt on the interrupt vector of the peripheral when a
μDMA transfer completes. Therefore, if μDMA is used to transfer data for a peripheral and interrupts are
used, then the interrupt handler for that peripheral must be designed to handle the
μDMA transfer
completion interrupt. If the transfer uses the software
μDMA channel, then the completion interrupt occurs
on the dedicated software
μDMA interrupt vector (see
When
μDMA is enabled for a peripheral, the μDMA controller stops the normal transfer interrupts for a
peripheral from reaching the interrupt controller (INTC). The interrupts are still reported in the interrupt
registers of the peripheral. Thus, when a large amount of data is transferred using
μDMA, instead of
receiving multiple interrupts from the peripheral as data flows, the INTC receives only one interrupt when
the transfer completes. Unmasked peripheral error interrupts continue to be sent to the INTC.
When a
μDMA channel generates a completion interrupt, the CHNLS bit corresponding to the peripheral
channel is set in the DMA Channel Request Done [UDMA_REQDONE] register. This register can be used
by the interrupt handler code of the peripheral to determine if the interrupt was caused by the
μDMA
channel or an error event reported by the interrupt registers of the peripheral. The completion interrupt
request from the
μDMA controller is automatically cleared when the interrupt handler is activated.
If the
μDMA controller encounters a bus or memory protection error as it tries to perform a data transfer,
the controller disables the
μDMA channel that caused the error and generates an interrupt on the μDMA
error interrupt vector. The processor can read the DMA Clear Bus Error [UDMA_ERROR] register to
determine if an error is pending. The STATUS bit is set if an error occurred. The error can be cleared by
setting the STATUS bit to 1.
NOTE:
The error interrupt/event goes to the event fabric as DMA_ERR, and is connected as
interrupt to CM3 through the [EVENT_CPUIRQSEL25] register.
lists the dedicated interrupt assignments for the
μDMA controller.
Table 12-6.
μDMA Interrupt Assignments
Interrupt
Assignment
40
μDMA software channel transfer
41
μDMA error
12.4 Initialization and Configuration
12.4.1 Module Initialization
The DMA controller resides in the peripheral domain, which must be powered up to enable the µDMA
controller. The following steps are necessary:
1. Enable the peripheral power domain by setting the PRCM_PDCTL0PERIPH.ON bit, or by using the
driver library function PRCMPowerDomainOn(PRCM_DOMAIN_PERIPH).
2. Enable the µDMA controller by setting the PRCM_SECDMACLKGR.DMA_CLK_EN bit and the
PRCM_SECDMACLKGS.DMA_CLK_EN bit, or by using the driver library functions
PRCMPeripheralRunEnable(uint32_t) and PRCMPeripheralSleepEnable(uint32_t).
3. Load the setting to clock controller by setting the PRCM_CLKLOADCTL.LOAD bit or by using the
function PRCMLoadSet().
4. Enable the µDMA controller by setting the MASTERENABLE bit of the DMA Configuration
[UDMA_CFG] register.
5. Program the location of the channel control table by writing the base address of the table to the DMA
Channel Control Base Pointer [UDMA_CTRL] register. The base address must be aligned on a 1024-
byte boundary.
1051
SWCU117A – February 2015 – Revised March 2015
Micro Direct Memory Access (µDMA)
Copyright © 2015, Texas Instruments Incorporated