
DMA request multiplexer (DMAMUX)
RM0453
486/1454
RM0453 Rev 2
A DMA request is sourced either from the peripherals or from the DMAMUX request
generator.
The DMAMUX request line multiplexer channel x selects the DMA request line number as
configured by the DMAREQ_ID field in the DMAMUX_CxCR register.
Note:
The null value in the field DMAREQ_ID corresponds to no DMA request line selected.
Caution:
A same non-null DMAREQ_ID must not be programmed to different x and y DMAMUX
request multiplexer channels (via DMAMUX_CxCR and DMAMUX_CyCR), except if
application guarantees that the two connected DMA channels are not simultaneously active.
On top of the DMA request selection, the synchronization mode and/or the event generation
may be configured and enabled, if required.
Synchronization mode and channel event generation
Each DMAMUX request line multiplexer channel x can be individually synchronized by
setting the synchronization enable (SE) bit in the DMAMUX_CxCR register.
DMAMUX has multiple synchronization inputs. The synchronization inputs are connected in
parallel to all the channels of the request multiplexer.
The synchronization input is selected via the SYNC_ID field in the DMAMUX_CxCR register
of a given channel x.
When a channel is in this synchronization mode, the selected input DMA request line is
propagated to the multiplexer channel output, once is detected a programmable
rising/falling edge on the selected input synchronization signal, via the SPOL[1:0] field of the
DMAMUX_CxCR register.
Additionally, there is a programmable DMA request counter, internally to the DMAMUX
request multiplexer, which may be used for the channel request output generation and also
possibly for an event generation. An event generation on the channel x output is enabled
through the EGE bit (event generation enable) of the DMAMUX_CxCR register.
As shown in
, upon the detected edge of the synchronization input, the pending
selected input DMA request line is connected to the DMAMUX multiplexer channel x output.
Note:
If a synchronization event occurs while there is no pending selected input DMA request line,
it is discarded. The following asserted input request lines is not connected to the DMAMUX
multiplexer channel output until a synchronization event occurs again.
From this point on, each time the connected DMAMUX request is served by the DMA
controller (a served request is deasserted), the DMAMUX request counter is decremented.
At its underrun, the DMA request counter is automatically loaded with the value in NBREQ
field of the DMAMUX_CxCR register and the input DMA request line is disconnected from
the multiplexer channel x output.
Thus, the number of DMA requests transferred to the multiplexer channel x output following
a detected synchronization event, is equal to the value in NBREQ field, plus one.
Note:
The NBREQ field value shall only be written by software when both synchronization enable
bit SE and event generation enable EGE bit of the corresponding multiplexer channel x are
disabled.