English
Language : 

PXS20RM Datasheet, PDF (442/1368 Pages) Freescale Semiconductor, Inc – PXS20 Microcontroller
Enhanced Direct Memory Access (eDMA)
19.4.7.1 Dynamic priority changing
The following two options are recommended for dynamically changing channel priority levels:
1. Switch to round-robin channel arbitration mode, change the channel priorities, then switch back to
fixed arbitration mode.
2. Disable all the channels, then change the channel priorities, then enable the appropriate channels.
19.4.7.2 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 programmer’s 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.
This same coherency model is true for dynamic scatter/gather operations. For both dynamic requests, the
TCD local memory controller forces the TCD.major.e_link and TCD.e_sg bits to zero on any writes to a
channel’s TCD.word7 after that channel’s TCD.done bit is set indicating the major loop is complete.
NOTE
The user must clear the TCD.done bit before writing the TCD.major.e_link
or TCD.e_sg bits. The TCD.done bit is cleared automatically by the eDMA
engine after a channel begins execution.
19-46
PXS20 Microcontroller Reference Manual, Rev. 1
Freescale Semiconductor