English
Language : 

PIC32MX440F256H-80I Datasheet, PDF (234/646 Pages) Microchip Technology – 64/100-Pin General Purpose and USB 32-Bit Flash Microcontrollers
PIC32MX3XX/4XX
10.5 Channel Chaining Mode
The Chaining mode is enabled by setting the Chaining
Enable it CHCEN bit (DCHxCON<5>) and Chaining
Direction bit CHCHNS (DCHxCON<8>).
Channel chaining is an enhancement to the DMA
channel operation.
A good usage is for transferring data packets from one
peripheral to memory and then from memory to
another peripheral. This module is also useful for
implementing data acquisition in multiple buffers.
Chaining mode features:
• A channel (slave channel) can be chained to an
adjacent channel (master channel). When the
master channel completes a block transfer the
slave channel will be enabled.
• At this point, any event on the slave channel will
initiate a cell transfer. If the channel has an event
pending, a cell transfer will begin immediately.
• Channels are chained in natural priority order
where channel 0 has the highest priority and
channel 3 the lowest. A specific channel can be
enabled by an adjacent channel, either higher, or
lower, in natural order, by configuring the
CHCHNS (DCHxCON<8>) bit. Chaining must be
enabled, CHCHN (DCHxCON<5>) = 1.
• An important feature of the DMA controller is the
ability to allow events while the channel is dis-
abled using the CHAED (DCHxCON<6>) bit. This
bit is particularly useful in Chained mode where
the slave channel needs to be ready to start a
transfer as soon as the channel is enabled by the
master channel.
10.5.1 CHAINING MODE CONFIGURATION
The Chaining mode is an option for use when perform-
ing DMA transfers. Therefore, the steps needed in
Chaining mode are identical to those used in basic
DMA configuration, with the following differences
(refer to Section 10.3.1 “Basic Transfer Mode Con-
figuration”):
• Two different channels have to be configured and
the slave channel has to have chaining enable
(CHCHN) and chaining direction (CHCHNS) set.
Refer to Example 10-3.
10.6 Channel Auto-Enable Mode
The Auto-Enable mode is enabled by setting the
CHAEN bit (DCHxCON<4>).
Channel auto-enable function is an enhancement to
the DMA channel operation.
The channel auto-enable can be used to keep a chan-
nel active, even if a block transfer completes or a pat-
tern match occurs. This prevents the user from having
to re-enable the channel each time a block transfer
completes. This mode is useful for applications that do
repeated pattern matching.
10.6.1 AUTO-ENABLE MODE
CONFIGURATION
The Auto-Enable mode is an extra option for use when
performing DMA transfers. Therefore, the steps
needed in Auto-Enable mode are identical to those
used in basic DMA configuration, with the following dif-
ferences (refer to Section 10.3.1 “Basic Transfer
Mode Configuration”):
• The CHAEN bit has to be set before enabling the
channel (setting the CHEN bit (DCHxCON<7>)).
• The channel will behave as normal except that
normal termination of a transfer will not result in
the channel being disabled.
• Normal block transfer completion is defined as:
- block transfer complete
- pattern match detect
• As before, the Channel Pointers will be reset.
DS61143E-page 232
Preliminary
© 2008 Microchip Technology Inc.