Enhanced Direct Memory Access (eDMA)
16. The channel retires → major loop complete. The eDMA goes idle or services the next
channel.
19.5.4.3
Modulo feature
The modulo feature of the eDMA provides the ability to implement a circular data queue in
which the size of the queue is a power of 2. MOD is a 5-bit field for the source and
destination in the TCD, and it specifies which lower address bits increment from their
original value after the address+offset calculation. All upper address bits remain the same
as in the original value. A setting of 0 for this field disables the modulo feature.
Table 199
field. Here a circular buffer is created where the address wraps to the original value while
the 28 upper address bits (0x1234567x) retain their original value. In this example the
source address is set to 0x12345670, the offset is set to 4 bytes, and the MOD field is set to
4, allowing for a 16-byte size queue.
19.5.5
eDMA TCDn status monitoring
This section discusses how to monitor eDMA status.
19.5.5.1
Minor loop complete
There are two methods to test for minor loop completion when using software initiated
service requests. The first is to read the TCDn_CITER field and test for a change. Another
method may be extracted from the sequence shown below. The second method is to test
the TCDn_CSR[START] bit and the TCDn_CSR[ACTIVE] bit. The minor-loop-complete
condition is indicated by both bits reading zero after the TCDn_CSR[START] was set.
Polling the TCDn_CSR[ACTIVE] bit may be inconclusive, because the active status may be
missed if the channel execution is short in duration.
The TCD status bits execute a sequence for a software activated channel as shown in the
following table.
Table 200. TCD status sequence – software activated channel
TCDn_CSR bits
Step
START
ACTIVE
1
1
0
2
0
1
444/2058
shows how the transfer addresses are specified based on the setting of the MOD
Table 199. Modulo feature example
Transfer number
1
2
3
4
5
6
DONE
0
Channel service request via software
0
Channel is executing
DocID027809 Rev 4
Address
0x12345670
0x12345674
0x12345678
0x1234567C
0x12345670
0x12345674
State
RM0400
Need help?
Do you have a question about the SPC572L series and is the answer not in the manual?
Questions and answers