English
Language : 

PXR40RM Datasheet, PDF (580/1434 Pages) Freescale Semiconductor, Inc – PXR40 Microcontroller
Enhanced Direct Memory Access Controller (eDMA)
15. eDMA engine writes: EDMA_x_TCD.ACTIVE = 0, EDMA_x_TCD.DONE = 1,
EDMA_x_IRQRn = 1.
16. The channel retires  major loop complete.
The eDMA goes idle or services the next channel.
21.5.5.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 two. MOD is a 5-bit bitfield for both the source and destination in the TCD and
specifies which lower address bits are allowed to 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 21-25 shows how the transfer addresses are specified based on the setting of the MOD 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 24 byte (16-byte) size queue.
Table 21-25. Modulo Feature Example
Transfer
Number
1
2
3
4
5
6
Address
0x12345670
0x12345674
0x12345678
0x1234567C
0x12345670
0x12345674
21.5.6 TCD Status
21.5.6.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 EDMA_x_TCD.CITER field and test for a change. Another method may
be extracted from the sequence below. The second method is to test the EDMA_x_TCD.START bit AND
the EDMA_x_TCD.ACTIVE bit. The minor loop complete condition is indicated by both bits reading zero
after the EDMA_x_TCD.START was written to a 1. Polling the EDMA_x_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. EDMA_x_TCD.START = 1, EDMA_x_TCD.ACTIVE = 0, EDMA_x_TCD.DONE = 0 (channel
service request via software).
21-56
PXR40 Microcontroller Reference Manual, Rev. 1
Freescale Semiconductor