XC2200 Derivatives
System Units (Vol. 1 of 2)
Interrupt and Trap Functions
User’s Manual
5-28
V2.1, 2008-08
ICU_X2K, V2.2
5.4.4
Channel Link Mode for Data Chaining
In channel link mode, every two PEC channels build a pair (channels 0+1, 2+3, 4+5,
6+7), where the two channels of a pair are activated in turn. Requests for the even
channel trigger the currently active PEC channel (or the end-of-block interrupt), while
requests for the odd channel only trigger its associated interrupt node. When the transfer
count of one channel expires, control is switched to the other channel, and back. This
mode supports data chaining where independent blocks of data can be transferred to the
same destination (or vice versa), e.g. to build communication frames from several
blocks, such as preamble, data, etc.
Channel link mode for a pair of channels is enabled if at least one of the channel link
control bits (bit CL in register PECCx) of the respective pair is set. A linked channel pair
is controlled by the priority-settings (level, group) for its even channel. After enabling
channel link mode the even channel is active.
Channel linking is executed
if the active channel’s link control bit CL is 1 at the time its
transfer count decrements from 1 to 0 (count > 0 before) and the transfer count of the
other channel is non-zero. In this case the active channel issues an EOP interrupt
request and the respective other channel of the pair is automatically selected.
Note: Channel linking always begins with the even channel.
Channel linking is terminated
if the active channel’s link control bit CL is 0 at the time
its transfer count decrements from 1 to 0, or if the transfer count of the respective linked
channel is zero. In this case an interrupt is triggered as selected by bit EOPINT (channel-
specific or general EOP interrupt).
A data-chaining sequence using PEC channel linking is programmed by setting bit CL
together with a transfer count value (> 0). This is repeated, triggered by the channel link
interrupts, for the complete sequence. For the last transfer, the interrupt routine should
clear the respective bit CL, so, at the end of the complete transfer, either a standard or
an END of PEC interrupt can be selected by bit EOPINT of the last channel.
Note: To enable linking, initially both channels must receive a non-zero transfer count.
For the rest of the sequence only the channel with the expired transfer count
needs to be reconfigured.