English
Language : 

PXD20RM Datasheet, PDF (683/1628 Pages) Freescale Semiconductor, Inc – PXD20 Microcontroller
h. write_word(0x201c) -> last iteration of the minor loop -> major loop complete
14. DMA engine writes: TCD.saddr = 0x1000, TCD.daddr = 0x2000, TCD.citer = 2 (TCD.biter)
15. DMA engine writes: TCD.active = 0, TCD.done = 1, DMAINT[n] = 1
16. The channel retires -> major loop complete
The DMA goes idle or services the next channel.
16.4.5 TCD status
16.4.5.1 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 may be extracted
from the sequence shown below. 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 may be inconclusive because the active status may 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 (channel service request via software)
2. TCD.start = 0, TCD.active = 1, TCD.done = 0 (channel is executing)
3. TCD.start = 0, TCD.active = 0, TCD.done = 0 (channel has completed the minor loop and is idle)
or
TCD.start = 0, TCD.active = 0, TCD.done = 1 (channel has completed the 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. ipd_req asserts (channel service request via hardware)
2. TCD.start = 0, TCD.active = 1, TCD.done = 0 (channel is executing)
3. TCD.start = 0, TCD.active = 0, TCD.done = 0 (channel has completed the minor loop and is idle)
or
TCD.start = 0, TCD.active = 0, TCD.done = 1 (channel has completed the 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.
Freescale Semiconductor
PXD20 Microcontroller Reference Manual, Rev. 1
Preliminary—Subject to Change Without Notice
16-45