MAX32660 User Guide
Maxim Integrated Page 76 of 195
When running in normal mode without buffer chaining (DMAn_CFG.rlden = 0), set the DMAn_CFG.chdien bit only. An
interrupt is generated upon DMA completion or an error condition (bus error or time-out error).
When running in buffer chaining mode (DMAn_CFG.rlden = 1), set both the DMAn_CFG.chdien and DMAn_CFG.ctzien bits.
The CTZ interrupts occur on completion of each DMA (count reaches zero and reload occurs). The setting of
DMAn_CFG.chdien ensures that an error condition generates an interrupt. If DMAn_CFG.ctzien = 0, then the only interrupt
occurs when the DMA completes and DMAn_CFG.rlden = 0 (final DMA).
7.9 Channel Time-outs
Each channel can optionally generate an interrupt when its associated request line is inactive for a given period of time. An
example use of this feature is to determine an idle UART receive channel. Each channel has a dedicated 10-bit timer
allowing use of a different timeout value.
7.10 10-bit Timer
Use the settings in the DMAn_CFG -bit timer. Scale the input clock for the timer using
the DMAn_CFG.pssel field. The options available are:
•
•
•
Note: HCLK is the AHB interface clock that enables the memory system to run at a different frequency than the system clock,
the cache controller, and the event monitor.
The DMAn_CFG.tosel field sets the time the 10-bit timer counts until generating an interrupt.
The 10-bit timer resets whenever any of the following conditions occur:
• The DMA request line programmed for the channel is activated.
• The channel is disabled for any reason (DMAn_STAT.ch_st = 0).
To disable the 10-bit timer, set the DMAn_CFG.pssel field to 0.
Normally, the 10-bit timer starts when the channel is enabled and the DMAn_CFG.pssel field is non-zero. However, if
DMAn_CFG.reqwait = 1, then the timer starts counting only after the first DMA request is received from the peripheral.
To calculate the time-out period, use Equation 7-1, below.
Equation 7-1: Timeout Equation for Standard DMA
For example, if
,
, and
, then the time-out
calculation is: