EasyManua.ls Logo

ST SPC560P34 - Table 199. Channel Linking Parameters; Dynamic Programming

ST SPC560P34
936 pages
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...
RM0046 Enhanced Direct Memory Access (eDMA)
Doc ID 16912 Rev 5 423/936
18.7.8 Dynamic programming
This section provides recommended methods to change the programming model during
channel execution.
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 is set in the programmers model, but it is
unclear whether the link completed before the channel retired.
Use the following coherency model when executing a dynamic channel link or dynamic
scatter/gather request:
1. Set the TCD.MAJOR.E_LINK bit
2. Read 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.D
b) If the bit is cleared, the channel had already retired before the dynamic link
completed.
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 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.
Table 199. 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