EasyManua.ls Logo

Freescale Semiconductor MPC5553 - Dynamic Programming

Default Icon
1208 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
MPC5553/MPC5554 Microcontroller Reference Manual, Rev. 5
Freescale Semiconductor 9-49
NOTE
After configuration, the TCD.CITER.E_LINK bit and the
TCD.BITER.E_LINK bit must be equal or a configuration error will be
reported. The CITER and BITER vector widths must be equal in order to
calculate the major loop, half-way done interrupt point.
Table 9-24 summarizes how a DMA channel can “link” to another DMA channel, i.e, use another
channel’s TCD, at the end of a loop.
9.5.8 Dynamic Programming
This section provides recommended methods to change the programming model during channel execution.
9.5.8.1 Dynamic Channel Linking and Dynamic Scatter/Gather
Dynamic channel linking and dynamic scatter/gather is the process of changing the
TCD.MAJOR.E_LINK or TCD.E_SG bits during channel execution. These bits are read from the TCD
local memory at the end of channel execution thus allowing the user to enable either feature during channel
execution.
Because the user is allowed to change the configuration during execution, a coherency model is needed.
Consider the scenario where the user attempts to execute a dynamic channel link by enabling the
TCD.MAJOR.E_LINK bit at the same time the eDMA engine is retiring the channel. The
TCD.MAJOR.E_LINK would be set in the programmers model, but it would be unclear whether the
actual link was made before the channel retired.
The following coherency model is recommended when executing a dynamic channel link or dynamic
scatter/gather request:
1. Set the TCD.MAJOR.E_LINK bit
2. Read back the TCD.MAJOR.E_LINK bit
3. Test the TCD.MAJOR.E_LINK request status:
a) If the bit is set, the dynamic link attempt was successful.
b) If the bit is cleared, the attempted dynamic link did not succeed, the channel was already
retiring.
Table 9-24. Channel Linking Parameters
Desired Link
Behavior
TCD Control Field Name Description
Link at end of
Minor Loop
citer.e_link Enable channel-to-channel linking on minor loop
completion (current iteration)
citer.linkch Link channel number when linking at end of minor
loop (current iteration)
Link at end of
Major Loop
major.e_link Enable channel-to-channel linking on major loop
completion
major.linkch Link channel number when linking at end of major
loop

Table of Contents

Related product manuals