7.3.2 Channel Configuration
Each DMA channel has associated configuration and loop counter registers for controlling direction of address increment , arbitration
slots, and descriptor looping.
7.3.2.1 Address Increment/Decrement
Normally DMA transfers increment the source and destination addresses after each DMA transfer. Each channel is also capable of dec-
rementing the source and/or destination addresses after each DMA transfer. This may be useful for flipping an array or copying data
from tail to head. For example, a data packet might be prepared as an array of data with increasing addresses and then transmitted
from the highest address to the lowest address, from tail to head.
After reset the SRCINCSIGN and DSTINCSIGN bits in the LDMA_CHx_CFG register are cleared causing the source and destination
addresses to increment after each transfer. If the SRCINCSIGN bit is set , the DMA will decrement the source address after each trans-
fer. If the DSTINCSIGN bit in the LDMA_CHx_CFG register is set , the DMA will decrement the destination address after each transfer.
Setting only one of these bits will flip the data. Setting both bits will copy from tail to head, but will not flip the data.
The SRCINCSIGN and DSTINCSIGN bits apply to all descriptors used by that channel. Software should take care to set the starting
source and/or destination address to the highest data address when decrementing.
7.3.2.2 Loop Counter
Each channel has a LDMA_CHx_LOOP register that includes a loop counter field. To use looping, software should initialize the loop
counter with the desired number of repetitions before enabling the transfer. A descriptor with the DECLOOPCNT bit set to TRUE will
repeat the loop and decrement the loop counter until LOOPCNT = 0.
For a looping descriptor, with DECLOOPCNT=1, the LINK address in the LDMA_CHx_LINK register is used as the loop address. While
LOOPCNT is greater than zero, the descriptor will execute and then the LDMA will load the next descriptor using the address specified
in the LDMA_CHx_LINK register. This feature enables looping of multiple descriptors. To repeat a single descriptor, the LINK address of
the descriptor should point to itself.
After LOOPCNT reaches zero, if the LINK bit in the descriptor LINK word is clear the transfer stops. If the LINK bit is set, the LDMA will
load the next sequential descriptor located immediately following the looping descriptor. The behavior of the LINK bit is different for a
looping descriptor. This is necessary because the LINK address is re-purposed as the loop address for a looping descriptor.
Note that LOOPCNT sets the number of repeats, not the number of iterations. The total number of loop iterations will be LOOPCNT
plus 1. Normally, the LOOPCNT should be set to one or more repeats.
Also note that because there is only one LOOPCNT per channel, software intervention is required to update the LOOPCNT if a se-
quence of transfers contains multiple loops. It is also possible to use a write immediate DMA data transfer to update the
LDMA_CHx_LOOP register.
7.3.3 Channel Select Configuration
The channel select block determines which peripheral request signal connects to each DMA channel.
This configuration is done by software through the SOURCESEL and SIGSEL fields of the LDMA_CHn_REQSEL register. SOURCE-
SEL selects the peripheral and SIGSEL picks which DMA request signals to use from the selected peripheral.
7.3.4 Starting a transfer
A transfer may be started by software, a peripheral request, or a descriptor load.
Software may initiate a transfer by setting the bit for the desired channel in the LDMA_SREQ register. In this case the channel should
set SOURCESEL to NONE to prevent unintentional triggering of the channel by a peripheral.
A peripheral may trigger the channel by configuring the peripheral source and signal as described in
7.3.3 Channel Select Configuration
The LDMA may also be configured to begin a transfer immediatly after a new descriptor is loaded by setting the STRUCTREQ field of
the LDMA_CHx_CTRL register or descriptor word.
This configuration is done by software through the SOURCESEL and SIGSEL fields of the LDMA_CHn_REQSEL register. SOURCE-
SEL selects the peripheral and SIGSEL picks which DMA request signals to use from the selected peripheral.
EFM32JG1 Reference Manual
LDMA - Linked DMA Controller
silabs.com
| Smart. Connected. Energy-friendly.
Preliminary Rev. 0.6 | 102