Initialization and Configuration
615
SLAU723A – October 2017 – Revised October 2018
Copyright © 2017–2018, Texas Instruments Incorporated
Micro Direct Memory Access (µDMA)
8.4.2.2.2 Configure Peripheral Interrupts
For memory-to-memory transfers, the peripheral involved must be configured to generate an interrupt
when the µDMA has completed its transfer. Upon completion, the µDMA sends a dma_done signal to the
peripheral.
8.4.2.3
Start the Transfer
Now the channel is configured and is ready to start.
1. Enable the channel by setting bit 30 of the DMA Channel Enable Set (DMAENASET) register.
2. Issue a transfer request by setting bit 30 of the DMA Channel Software Request (DMASWREQ)
register.
The µDMA transfer begins. If the interrupt is enabled, then the processor is notified by interrupt when the
transfer is complete. If needed, the status can be checked by reading bit 30 of the DMAENASET register.
This bit is automatically cleared when the transfer is complete. The status can also be checked by reading
the XFERMODE field of the channel control word at offset 0x1E8. This field is automatically cleared at the
end of the transfer.
8.4.3 Configuring a Peripheral for Simple Transmit
This example configures the µDMA controller to transmit a buffer of data to a peripheral. The peripheral
has a transmit FIFO with a trigger level of 4. The example peripheral uses µDMA channel 7.
8.4.3.1
Configure the Channel Attributes
First, configure the channel attributes:
1. Configure bit 7 of the DMA Channel Priority Set (DMAPRIOSET) or DMA Channel Priority Clear
(DMAPRIOCLR) registers to set the channel to high priority or default priority.
2. Set bit 7 of the DMA Channel Primary Alternate Clear (DMAALTCLR) register to select the primary
channel control structure for this transfer.
3. Set bit 7 of the DMA Channel Useburst Clear (DMAUSEBURSTCLR) register to allow the µDMA
controller to respond to single and burst requests.
4. Set bit 7 of the DMA Channel Request Mask Clear (DMAREQMASKCLR) register to allow the µDMA
controller to recognize requests for this channel.
8.4.3.2
Configure the Channel Control Structure
This example transfers 64 bytes from a memory buffer to the peripheral's transmit FIFO register using
µDMA channel 7. The control structure for channel 7 is at offset 0x070 of the channel control table. The
channel control structure for channel 7 is located at the offsets shown in
.
Table 8-8. Channel Control Structure Offsets for Channel 7
Offset
Description
Control Table Base + 0x070
Channel 7 source end pointer
Control Table Base + 0x074
Channel 7 destination end pointer
Control Table Base + 0x078
Channel 7 control word
8.4.3.2.1 Configure the Source and Destination
The source and destination end pointers must be set to the last address for the transfer (inclusive).
Because the peripheral pointer does not change, it simply points to the peripheral's data register.
1. Program the source end pointer at offset 0x070 to the address of the source 0x3F.
2. Program the destination end pointer at offset 0x074 to the address of the peripheral's transmit FIFO
register.
The control word at offset 0x078 must be programmed according to
.