Dynamic Programming - Freescale Semiconductor MCF5329 Reference Manual

Devices supported: mcf5327; mcf5328; mcf53281; mcf5329
Table of Contents

Advertisement

loop is exhausted, only the major loop channel link fields are used to determine if a channel link should be
made. For example, the initial fields of:
TCDn_CITER[E_LINK] = 1
TCDn_CITER[LINKCH] = 0xC
TCDn_CITER[CITER] value = 0x4
TCDn_CSR[MAJOR_E_LINK] = 1
TCDn_CSR[MAJOR_LINKCH] = 0x7
executes as:
1. Minor loop done → set TCD12_CSR[START] bit
2. Minor loop done → set TCD12_CSR[START] bit
3. Minor loop done → set TCD12_CSR[START] bit
4. Minor loop done, major loop done → set TCD7_CSR[START] bit
When minor loop linking is enabled (TCDn_CITER[E_LINK] = 1), the TCDn_CITER[CITER] field uses
a nine bit vector to form the current iteration count. When minor loop linking is disabled
(TCDn_CITER[E_LINK] = 0), the TCDn_CITER[CITER] field uses a 15-bit vector to form the current
iteration count. The bits associated with the TCDn_CITER[LINKCH] field are concatenated onto the
CITER value to increase the range of the CITER.
The TCDn_CITER[E_LINK] bit and the TCDn_BITER[E_LINK] bit must
equal or a configuration error is reported. The CITER and BITER vector
widths must be equal to calculate the major loop, half-way done interrupt
point.
Table 16-35
summarizes how a DMA channel can link to another DMA channel, i.e, use another channel's
TCD, at the end of a loop.
Desired Link
TCD Control Field Name
Behavior
CITER[E_LINK]
Link at end of
Minor Loop
CITER[LINKCH]
CSR[MAJOR_E_LINK]
Link at end of
Major Loop
CSR[MAJOR_LINKCH]
16.8.7

Dynamic Programming

This section provides recommended methods to change the programming model during channel execution.
16.8.7.1
Dynamic Channel Linking and Dynamic Scatter/Gather
Dynamic channel linking and dynamic scatter/gather is the process of changing the
TCDn_CSR[MAJOR_E_LINK] or TCDn_CSR[E_SG] bits during channel execution. These bits are read
Freescale Semiconductor
NOTE
Table 16-35. Channel Linking Parameters
Enable channel-to-channel linking on minor loop completion (current iteration)
Link channel number when linking at end of minor loop (current iteration)
Enable channel-to-channel linking on major loop completion
Link channel number when linking at end of major loop
MCF5329 Reference Manual, Rev 3
Enhanced Direct Memory Access (eDMA)
Description
16-37

Advertisement

Table of Contents
loading

Table of Contents