RM0046 Enhanced Direct Memory Access (eDMA)
Doc ID 16912 Rev 5 421/936
18.7.6 TCD status
Minor loop complete
There are two methods to test for minor loop completion when using software initiated
service requests. The first method is to read the TCD.CITER field and test for a change.
Another method can be extracted from the following sequence. The second method is to
test the TCD.START bit AND the TCD.ACTIVE bit. The minor loop complete condition is
indicated by both bits reading zero after the TCD.START was written to a one. Polling the
TCD.ACTIVE bit can be inconclusive because the active status can be missed if the channel
execution is short in duration.
The TCD status bits execute the following sequence for a software activated channel:
1. TCD.START = 1, TCD.ACTIVE = 0, TCD.DONE = 0 (issued service request via
software)
2. TCD.START = 0, TCD.ACTIVE = 1, TCD.DONE = 0 (executing)
3. TCD.START = 0, TCD.ACTIVE = 0, TCD.DONE = 0 (completed minor loop and is idle)
or
4. TCD.START = 0, TCD.ACTIVE = 0, TCD.DONE = 1 (completed major loop and is idle)
The best method to test for minor loop completion when using hardware initiated service
requests is to read the TCD.CITER field and test for a change. The hardware request and
acknowledge handshakes signals are not visible in the programmer’s model.
The TCD status bits execute the following sequence for a hardware activated channel:
1. eDMA peripheral request asserts (issued service request via hardware)
2. TCD.START = 0, TCD.ACTIVE = 1, TCD.DONE = 0 (executing)
3. TCD.START = 0, TCD.ACTIVE = 0, TCD.DONE = 0 (completed minor loop and is idle)
or
4. TCD.START = 0, TCD.ACTIVE = 0, TCD.DONE = 1 (completed major loop and is idle)
For both activation types, the major loop complete status is explicitly indicated via the
TCD.DONE bit.
The TCD.START bit is cleared automatically when the channel begins execution regardless
of how the channel was activated.
Active channel TCD reads
the eDMA reads the true TCD.SADDR, TCD.DADDR, and TCD.NBYTES values if read
while a channel is executing. The true values of the SADDR, DADDR, and NBYTES are the
values the eDMA engine is currently using in its internal register file and not the values in the
TCD local memory for that channel. The addresses (SADDR and DADDR) and NBYTES
(decrements to zero as the transfer progresses) can give an indication of the progress of the
transfer. All other values are read back from the TCD local memory.
Preemption status
Preemption is only available when fixed arbitration is selected for both group and channel
arbitration modes. A preempt-able situation is one in which a preempt-enabled channel is
running and a higher priority request becomes active. When the eDMA engine is not
operating in fixed group, fixed channel arbitration mode, the determination of the relative
priority of the actively running and the outstanding requests become undefined. Channel