17. Chrom-ART2 accelerator controller (DMA2D)
17.1 DMA2D introduction
The Chrom-ART2 accelerator (DMA2D) is a specialized DMA dedicated to image manipulation. It can perform the following operations:
- • Filling a part or the whole of a destination image with a specific color
- • Copying a part or the whole of a source image into a part or the whole of a destination image
- • Copying a part or the whole of a source image into a part or the whole of a destination image with a pixel format conversion
- • Blending a part and/or two complete source images with different pixel format and copying the result into a part or the whole of a destination image with a different color format
- • 90°/180°/270° rotation and mirroring
- • Downscaling
- • Stenciling
- • Command list support
All the classical color coding schemes are supported from 1-bit up to 32-bit per pixel with indexed or direct color mode, including block based \(YC_B C_R\) to handle JPEG decoder output. The DMA2D has its own dedicated memories for CLUTs (color look-up tables).
17.2 DMA2D main features
The main DMA2D features are:
- • Single AHB master bus architecture
- • AHB register interface supporting 8-, 16-, 32-bit accesses (except for CLUT accesses which are 32-bit)
- • User-programmable working area size
- • User-programmable offset for sources and destination areas expressed in pixels or bytes
- • User-programmable sources and destination addresses on the whole memory space
- • Up to two sources with blending operation
- • Alpha value that can be modified (source value, fixed value, or modulated value)
- • User programmable source and destination color format
- • Up to 12 color formats supported from 1-bit up to 32-bit per pixel with indirect or direct color coding
- • Stencil buffer support from 1-bit up to 8-bit
- • 90/180/270° rotation and mirroring
- • Downscaling from 1 down to 1/4096
- • JPEG block based (8×8/16×8/16×16) YCBCR support with 4:4:4, 4:2:2 and 4:2:0 chroma sub-sampling factors
- • Two internal memories for CLUT storage in indirect color mode
- • Automatic CLUT loading or CLUT programming via the CPU
- • User programmable CLUT size
- • Internal timer to control AHB bandwidth
- • Six operating modes: register-to-memory, memory-to-memory, memory-to-memory with pixel format conversion, memory-to-memory with pixel format conversion and blending, memory-to-memory with pixel format conversion, blending and fixed color foreground, and memory-to-memory with pixel format conversion, blending, and fixed color background.
- • Area filling with a fixed color
- • Copy from an area to another
- • Copy with pixel format conversion between source and destination images
- • Copy from two sources with independent color format and blending
- • Output buffer byte swapping to support refresh of displays through parallel interface
- • Abort and suspend of DMA2D operations
- • Watermark interrupt on a user-programmable destination line
- • Interrupt generation on bus error or access conflict
- • Interrupt generation on process completion
- • Four general purpose flags for system synchronization, breakpoints and external triggering/debug
17.3 DMA2D functional description
17.3.1 General description
The DMA2D controller performs direct memory transfer. As an AHB master, it can take the control of the AHB bus matrix to initiate AHB transactions.
The DMA2D can operate in the following modes:
- • Register-to-memory
- • Memory-to-memory
- • Memory-to-memory with pixel format conversion
- • Memory-to-memory with pixel format conversion and blending
- • Memory-to-memory with pixel format conversion, blending, and fixed color foreground
- • Memory-to-memory with pixel format conversion, blending, and fixed color background
The AHB register interface port is used to program the DMA2D controller.
The block diagram of the DMA2D is shown in Figure 91.
Figure 91. DMA2D block diagram

17.3.2 DMA2D internal signals
The input/output pins and internal signals of the DMA2D are given in the tables below:
Table 138. DMA2D input/ouput pins
| Names | Signal type | Description |
|---|---|---|
| DMA2D_GPFLAG0 | Output | DMA2D general purpose flag 0 output |
| DMA2D_GPFLAG1 | Output | DMA2D general purpose flag 1 output |
| DMA2D_GPFLAG2 | Output | DMA2D general purpose flag 2 output |
| DMA2D_GPFLAG3 | Output | DMA2D general purpose flag 3 output |
Table 139. DMA2D internal signals
| Names | Signal type | Description |
|---|---|---|
| dma2d_hclk | Input | DMA2D AHB clock |
| dma2d_it | Output | DMA2D global interrupt request |
| dma2d_ctc | Output | DMA2D CLUT transfer complete trigger |
| dma2d_tc | Output | DMA2D transfer complete trigger |
| dma2d_tw | Output | DMA2D transfer watermark trigger |
| dma2d_gpflag0 | Output | DMA2D general purpose flag 0 |
| dma2d_gpflag1 | Output | DMA2D general purpose flag 1 |
| dma2d_gpflag2 | Output | DMA2D general purpose flag 2 |
| dma2d_gpflag3 | Output | DMA2D general purpose flag 3 |
| dma2d_gpflagset0 | Input | DMA2D general purpose flag 0 set |
| dma2d_gpflagset1 | Input | DMA2D general purpose flag 1 set |
| dma2d_gpflagset2 | Input | DMA2D general purpose flag 2 set |
| dma2d_gpflagset3 | Input | DMA2D general purpose flag 3 set |
| dma2d_gpflagrst0 | Input | DMA2D general purpose flag 0 reset |
| dma2d_gpflagrst1 | Input | DMA2D general purpose flag 1 reset |
| dma2d_gpflagrst2 | Input | DMA2D general purpose flag 2 reset |
| dma2d_gpflagrst3 | Input | DMA2D general purpose flag 3 reset |
Table 140. DMA2D trigger interconnections
| Trigger name | Direction | Trigger source/destination |
|---|---|---|
| dma2d_tc | Output | gpdma1_trigsel[47] |
| gpdma2_trigsel[47] | ||
| dma2d_ctc | Output | gpdma1_trigsel[48] |
| gpdma2_trigsel[48] | ||
| dma2d_tw | Output | gpdma1_trigsel[49] |
| gpdma2_trigsel[49] |
Table 140. DMA2D trigger interconnections (continued)
| Trigger name | Direction | Trigger source/destination |
|---|---|---|
| dma2d_gpflag0 | Output | gpdma1_trigsel[50] |
| gpdma2_trigsel[50] | ||
| dma2d_gpflag1 | Output | gpdma1_trigsel[51] |
| gpdma2_trigsel[51] | ||
| dma2d_gpflag2 | Output | gpdma1_trigsel[52] |
| gpdma2_trigsel[52] | ||
| dma2d_gpflag3 | Output | gpdma1_trigsel[53] |
| gpdma2_trigsel[53] | ||
| Used also for debug | ||
| dma2d_gpflagset0 | Input | Reserved |
| dma2d_gpflagset1 | Input | Reserved |
| dma2d_gpflagset2 | Input | Reserved |
| dma2d_gpflagset3 | Input | Used also for debug |
| dma2d_gpflagrst0 | Input | Reserved |
| dma2d_gpflagrst1 | Input | Reserved |
| dma2d_gpflagrst2 | Input | Reserved |
| dma2d_gpflagrst3 | Input | Used also for debug |
17.3.3 DMA2D pipeline
The functional blocks of the DMA2D are pipelined in a configurable manner.
Each functional block can be positioned at a different stage of the pipeline depending on their respective source (SRC) fields.
As the scaler is working only in scan line mode and the tile buffer only in tile mode, they cannot be enable in the same configuration.
As the tile buffer is also responsible of \(Y C_B C_R\) conversion, it's not possible to enable in the same time scaling and JPEG.
Figure 92. DMA2D pipeline

The diagram illustrates the DMA2D pipeline stages and data flow for three layers: Stencil, Foreground (FG), and Background (BG). The stages are: Fetching, PFC & Pixel skipping, Pre-blend Stenciling, Pre-Blend Scaling or Buffer/Rotate & YCbCr, Blending, Post-blend Stenciling, Post-Blend Scaling or Buffer/Rotate, PFC, and Writeback.
- Fetching: Fetch (Stencil), Fetch (FG), Fetch (BG).
- PFC & Pixel skipping: PFC (A) and Skip for Stencil; PFC (RGB) and Skip for FG and BG.
- Pre-blend Stenciling: Stencil blocks receive input from the PFC & Pixel skipping stage and output to the Pre-Blend Scaling or Buffer/Rotate & YCbCr stage.
- Pre-Blend Scaling or Buffer/Rotate & YCbCr: Scale and Buffer Rotate (PFC (YCbCr)) blocks for each layer. The Stencil output also feeds into the Scale blocks.
- Blending: Blend block receives inputs from the Scale and Buffer Rotate blocks of the FG and BG layers.
- Post-blend Stenciling: Stencil block receives input from the Blend stage and outputs to the Post-Blend Scaling or Buffer/Rotate stage.
- Post-Blend Scaling or Buffer/Rotate: Scale and Buffer Rotate blocks for each layer. The Stencil output also feeds into the Scale blocks.
- PFC: PFC (RGB) block receives input from the Post-Blend Scaling or Buffer/Rotate stage.
- Writeback: Write block receives input from the PFC (RGB) stage.
MSv74127V1
Fetching and input PFC and pixel skipping stage
The fetching and PFC and pixel skipping stage are performed by the PFC block of the foreground and the background layer and by the stencil block for the stencil buffer.
Pre-blend stencil stage
The stencil buffer can be configured to be at the output of either the foreground layer or the background layer.
Pre-blend scaling or buffer/rotate and YCbCr stage
The scaler can be configured to be at the output of either the foreground layer or the background layer. If stencil is allocated to the layer selected for the scaler, the scaler is directly connected to the stencil output.
As a consequence in case of layer scaling with stenciling, the size of the stencil buffer is equal to the size of the layer before scaling (DMA2D, SNLR).
The tile buffer performs the buffering, the rotation, and the YCbCr conversion in case of JPEG processing.
As the tile buffer is only working on tile mode and the scaler in scanline mode, both functions are exclusive and cannot be enable in the same time.
The tile buffer can be configured to be at the output of either the foreground layer or the background layer. If stencil is allocated to the layer selected for the tile buffer, the tile buffer is directly connected to the stencil output.
Blending stage
The blending stage is doing the blending between the foreground and the background layer.
Post-blend stenciling stage
The stencil buffer can be configured to be at the output of either the blender to apply the stencil on the composed image.
Post-blend scaling or buffer/rotate
The scaler can be configured to be at the output of the blender. If stencil is allocated to the blender output, the scaler is directly connected to the stencil output.
As a consequence in case of blender scaling with stenciling, the size of the stencil buffer is equal to the size of the layers before scaling (DMA2D, SNLR).
The tile buffer performs the buffering and the rotation. As the blender is RGB, no YCbCr conversion can be done at this stage.
As the tile buffer is only working on tile mode and the scaler in scanline mode, both functions are exclusive and cannot be enable in the same time.
The tile buffer can be configured to be at the output of the blender. If stencil is allocated to the blender output, the tile buffer is directly connected to the stencil output.
Output PFC stage and write back stage
The output PFC stage does the final pixel format conversion and write the pixel in the output memory.
17.3.4 DMA2D control and global operating mode
The DMA2D controller is configured through DMA2D_CR. The user application can perform the following operations:
- • Select the operating mode.
- • Enable/disable the DMA2D interrupt.
- • Start/suspend/abort ongoing data transfers.
The operating mode is one of the following
- • Register-to-memory
- • Memory-to-memory
- • Memory-to-memory with pixel format conversion
- • Memory-to-memory with pixel format conversion and blending
- • Memory-to-memory with pixel format conversion, blending, and fixed color foreground
- • Memory-to-memory with pixel format conversion, blending, and fixed color background
Regardless of the data arrangement in the memory, the DMA2D can process the data in tile mode of either when the tile buffer is used (this includes JPEG data ordering).
17.3.5 DMA2D fetching stage
The DMA2D foreground (FG) and background (BG) fetch stages are retrieving the input data to be copied and/or processed.
When the DMA2D operates in register-to-memory mode, none of the fetch stages are activated.
When the DMA2D operates in memory-to-memory mode (no pixel format conversion nor blending operation), only the FG fetch is activated, and acts as a buffer.
When the DMA2D operates in memory-to-memory operation with pixel format conversion (no blending operation), the BG fetch is not activated.
Image parameters
The pixels are fetched according to the color format defined in their respective pixel format converter (PFC).
They are programmed through the following control registers:
- • DMA2D foreground memory address register (DMA2D_FGMAR)
- • DMA2D foreground offset register (DMA2D_FGOR)
- • DMA2D background memory address register (DMA2D_BGMAR)
- • DMA2D background offset register (DMA2D_BGBOR)
- • DMA2D number of lines register (number of lines and pixel per line) (DMA2D_NLR)
Figure 93. DMA2D image parameters

The diagram illustrates the DMA2D image parameters. It shows a large dashed rectangle representing the overall memory area. Inside this, a solid gray rectangle is labeled 'Working Area (PL & NL common to all layers)'. A horizontal double-headed arrow at the top of the Working Area is labeled 'PL (pixel)'. A vertical double-headed arrow on the left of the Working Area is labeled 'NL (line)'. A horizontal double-headed arrow at the bottom of the Working Area is labeled 'LO (Pixel or byte)'. A diagonal arrow points from the text 'Base address MA[31:0]' to the top-left corner of the Working Area. The reference 'MSv74128V1' is located in the bottom right corner of the diagram area.
Pixel components arrangement in memory
The standard order of the pixels components in the system memory is defined in the Table 141.
Table 141. Pixel components order in memory
| Color mode | @ + 3 | @ + 2 | @ + 1 | @ + 0 |
|---|---|---|---|---|
| ARGB8888 | A0[7:0] | R0[7:0] | G0[7:0] | B0[7:0] |
| RGB888 | B1[7:0] | R0[7:0] | G0[7:0] | B0[7:0] |
| G2[7:0] | B2[7:0] | R1[7:0] | G1[7:0] | |
| R3[7:0] | G3[7:0] | B3[7:0] | R2[7:0] | |
| RGB565 | R1[4:0]G1[5:3] | G1[2:0]B1[4:0] | R0[4:0]G0[5:3] | G0[2:0]B0[4:0] |
| ARGB1555 | A1[0]R1[4:0]G1[4:3] | G1[2:0]B1[4:0] | A0[0]R0[4:0]G0[4:3] | G0[2:0]B0[4:0] |
| ARGB4444 | A1[3:0]R1[3:0] | G1[3:0]B1[3:0] | A0[3:0]R0[3:0] | G0[3:0]B0[3:0] |
| L8 | L3[7:0] | L2[7:0] | L1[7:0] | L0[7:0] |
| AL44 | A3[3:0]L3[3:0] | A2[3:0]L2[3:0] | A1[3:0]L1[3:0] | A0[3:0]L0[3:0] |
| AL88 | A1[7:0] | L1[7:0] | A0[7:0] | L0[7:0] |
| L4 | L7[3:0]L6[3:0] | L5[3:0]L4[3:0] | L3[3:0]L2[3:0] | L1[3:0]L0[3:0] |
| A8 | A3[7:0] | A2[7:0] | A1[7:0] | A0[7:0] |
| A4 | A7[3:0]A6[3:0] | A5[3:0]A4[3:0] | A3[3:0]A2[3:0] | A1[3:0]A0[3:0] |
| A2 | A15[1:0]A14[1:0]A13[1:0]A12[1:0] | A11[1:0]A10[1:0]A9[1:0]A8[1:0] | A7[1:0]A6[1:0]A5[1:0]A4[1:0] | A3[1:0]A2[1:0]A1[1:0]A0[1:0] |
| A1 | A31A30A29A28A27A26A25A24 | A23A22A21A20A19A18A17A16 | A15A14A13A12A11A10A9A8 | A7A6A5A4A3A2A1A0 |
| ARGB2222 | A3[1:0]R3[1:0]G3[1:0]B3[1:0] | A2[1:0]R2[1:0]G2[1:0]B2[1:0] | A1[1:0]R1[1:0]G1[1:0]B1[1:0] | A0[1:0]R0[1:0]G0[1:0]B0[1:0] |
The 24-bit RGB888 aligned on 32-bit is supported through the ARGB8888 mode.
For ARGB and RGB color formats, the component order can be modified by the Red/Blue swap (RBS) bit and/or the alpha position (APOS) bit of the DMA2D foreground pixel format converter control register (DMA2D_FGPFCCR) or DMA2D background pixel format converter control register (DMA2D_BGPFCCR) as shown in Table 142.
Table 142. ARGB/RGB component reordering
| RBS = 0, APOS = 0 | RBS = 1, APOS = 0 | RBS = 0, APOS = 1 | RBS = 1, APOS = 1 |
|---|---|---|---|
| ARGB8888 | ABGR8888 | RGBA8888 | BGRA8888 |
| RGB888 | BGR888 | RGB888 | BGR888 |
| RGB565 | BGR565 | RGB565 | BGR565 |
| ARGB1555 | ABGR1555 | RGBA5551 | BGRA5551 |
| ARGB4444 | ABGR4444 | RGBA4444 | BGRA4444 |
| ARGB2222 | ABGR2222 | RGBA2222 | BGRA2222 |
Chrom-ART2 accelerator controller (DMA2D)
RM0517
Pixel arrangement in memory
The pixels are arranged in scan line in the memory
- • The image is not divided.
- • All the pixels of a line are consecutive.
- • All the lines are consecutive.
17.3.6 DMA2D input pixel format conversion stage
DMA2D foreground pixel format converter (PFC) and background pixel format converter perform the pixel format conversion to generate a 32-bit per pixel value. The PFC can also modify the alpha channel.
Figure 94. DMA2D input PFC

The block diagram shows the DMA2D input PFC stage inside a frame labeled 'Input PFC'. Bytes input goes to an Expander which connects to a 256x32-bit CLUT and a multiplexer controlled by Color mode. The 32-bit output splits into A (8-bit) and RGB (24-bit). The alpha path passes through an 8-bit A block and multiplier (X), controlled by Alpha mode, resulting in 8-bit A and 24-bit RGB combined into 32-bit ARGB Pixels.
MSv74129V1
The first PFC stage converts the color format. The original color format of the foreground and background pixels are configured through CM[3:0] in DMA2D_FGPFCCR and DMA2D_BGPFCCR, respectively.
The supported input formats are given in the table below.
Table 143. Supported color mode in input
| CM[3:0] | Color mode |
|---|---|
| 0000 | ARGB8888 |
| 0001 | RGB888 |
| 0010 | RGB565 |
| 0011 | ARGB1555 |
| 0100 | ARGB4444 |
| 0101 | L8 |
| 0110 | AL44 |
| 0111 | AL88 |
| 1000 | L4 |
| 1001 | A8 |
| 1010 | A4 |
| 1011 | JPEG |
| 1100 | A2 |
770/3945
RM0517 Rev 1

| CM[3:0] | Color mode |
|---|---|
| 1101 | A1 |
| 1110 | ARGB2222 |
| 1111 | Reserved |
The color formats are coded as follows:
- • Alpha value field: transparency
0xFF value corresponds to an opaque pixel and 0x00 to a transparent one. - • R field for Red
- • G field for Green
- • B field for Blue
- • L field: luminance
This field is the index to a CLUT to retrieve the three/four RGB/ARGB components.
If the original format was direct color mode (ARGB/RGB), the extension to 8-bit per channel is performed by copying the MSBs into the LSBs. This ensures a perfect linearity of the conversion.
If the original format does not include an alpha channel, the alpha value is automatically set to 0xFF (opaque).
If the original format is indirect color mode (L/AL), a CLUT is required, and each pixel format converter is associated with a 256 entry 32-bit CLUT.
For the specific alpha modes A1, A2, A4, and A8, no color information is stored nor indexed. The color to be used for the image generation is fixed and defined in DMA2D_FGCOLR for foreground pixels, and in DMA2D_BGCOLR for background pixels.
Once the 32-bit value is generated, the alpha channel can be modified according to AM[1:0] in DMA2D_FGPFCCR or DMA2D_BGPFCCR, as shown in Table 144.
One of the following happens for the alpha channel:
- • It is kept as it is (no modification).
- • It is replaced by ALPHA[7:0] value in DMA2D_FGPFCCR/DMA2D_BGPFCCR.
- • It is replaced by the original alpha value multiplied by ALPHA[7:0] in DMA2D_FGPFCCR/DMA2D_BGPFCCR divided by 255.
| AM[1:0] | Alpha mode |
|---|---|
| 00 | No modification |
| 01 | Replaced by value in DMA2D_xxPFCCR |
| 10 | Replaced by original value multiplied by the value in DMA2D_xxPFCCR / 255 |
| 11 | Reserved |
Note: To support the alternate format, the incoming alpha value can be inverted by setting AI in DMA2D_FGPFCCR or DMA2D_BGPFCCR. This applies also to the Alpha value stored in the DMA2D_FGPFCCR or DMA2D_BGPFCCR, and in the CLUT.
The R and B fields can also be swapped setting RBS in DMA2D_FGPFCCR or DMA2D_BGPFCCR, and the Alpha position can be changed setting the APOS in DMA2D_FGPFCCR or DMA2D_BGPFCCR. This applies also to the RGB order used in the CLUT, and in DMA2D_FGCOLR or DMA2D_BGCOLR.
17.3.7 DMA2D foreground and background CLUT interface
The CLUT interface manages the CLUT memory access and the automatic loading of the CLUT.
The CLUT loading cannot be done concurrently with an image transfer. Each CLUT must be loaded sequentially and independently prior to the image transfer.
Three kinds of access are possible:
- • CLUT read by the PFC during pixel format conversion operation
- • CLUT accessed through the AHB register interface when the CPU is reading or writing data into the CLUT
- • CLUT written through the AHB master port when an automatic loading of the CLUT is performed
The CLUT memory loading can be done in two different ways:
- • Manual loading
The application has to program the CLUT manually through the DMA2D AHB register interface port to which the local CLUT memory is mapped. The foreground CLUT (FGCLUT) is located at address offset 0x0400 and the background CLUT (BGCLUT) at address offset 0x0800.
The written value must be in ARGB8888 format. - • Automatic loading
The following sequence must be followed to load the CLUT:- a) Program the CLUT address into DMA2D_FGCMAR (foreground CLUT) or DMA2D_BGCMAR (background CLUT).
- b) Program the CLUT size with CS[7:0] field and the color coding with the CM[3:0] field in DMA2D_FGPFCCR (foreground CLUT), or DMA2D_BGPFCCR (background CLUT).
- c) Set START in DMA2D_FGPFCCR (foreground CLUT) or DMA2D_BGPFCCR (background CLUT) to start the transfer. During this automatic loading process, the CLUT is not accessible by the CPU. If a conflict occurs, a CLUT access error interrupt is raised assuming CAEIE = 1 in DMA2D_IER.
In automatic loading, the PFC is used to convert the CLUT source format which can be 8 to 32 bits per pixel. It is configured through CM in DMA2D_FGPFCCR (foreground CLUT) or DMA2D_BGPFCCR (background CLUT) as shown in table below.
Table 145. Supported CLUT color mode
| CM[3:0] | CLUT color mode |
|---|---|
| 0000 | ARGB8888 |
| 0001 | RGB888 |
| CM[3:0] | CLUT color mode |
|---|---|
| 0010 | RGB565 |
| 0011 | ARGB1555 |
| 0100 | ARGB4444 |
| 1110 | ARGB2222 |
| others | Reserved |
The way the CLUT data are organized in the system memory is following the pixel organization defined in Table 141: Pixel components order in memory.
The following functions are also supported by CLUT loading:
- • AI for alpha inversion
- • RBS and APOS for RGB/BGR/ARGB/BGRA support
- • ALPHA to add a specific alpha value in the CLUT during its loading
- • AM for modifying alpha value during the CLUT loading
17.3.8 DMA2D pixel skipper stage
Once the pixels have been fetched and converted by the PFC, pixels can be skipped at the beginning and/or at the end of each line to allow a pixel accurate positioning in A1, A2, A4, and L4 modes.
The number of pixels to skip is programmed in the DMA2D foreground memory skip register (DMA2D_FGMSR) or DMA2D background memory skip register (DMA2D_BGMSR):
- • The HPRE field defines the number of pixels to be skipped at the beginning of a line
- • The HTRAIL field defines the number of pixels to be skipped at the end of a line
HPRE and HTRAIL are used to byte align the data in A1, A2, A4, and L4 modes.
As a consequence, the number of pixels per line (PL) + HPRE + HTRAIL must be aligned with the chosen pixel format:
- • HPRE and HTRAIL are in the range [0..1] and HPRE + PL + HTRAIL must be multiple of 2 for the A4 or L4 mode
- • HPRE and HTRAIL are in the range [0..3] and HPRE + PL + HTRAIL must be multiple of 4 for the A2 mode
- • HPRE and HTRAIL are in the range [0..7] and HPRE + PL + HTRAIL must be multiple of 8 for the A1 mode
In JPEG mode, as the base address of a layer must be at the beginning of an MCU, both pixels and lines can be skipped at the beginning and/or at the end of image to allow a pixel accurate positioning.
The number of lines and the number of pixels to skip are programmed in the DMA2D foreground memory skip register (DMA2D_FGMSR) or DMA2D background memory skip register (DMA2D_BGMSR):
- • The HPRE field defines the number of pixels to be skipped at the beginning of a line
- • The HTRAIL field defines the number of pixels to be skipped at the end of a line
- • The VPRE field defines the number of lines to be skipped at the beginning of an image
- • The VTRAIL field defines the number of lines to be skipped at the end of an image
As a consequence, the number of pixels per line (PL) + HPRE + HTRAIL must be aligned with the chosen chroma sub-sampling format:
- • HPRE and HTRAIL are in the range [0..7] and HPRE + PL + HTRAIL must be multiple of 8 for the JPEG 4:4:4 mode
- • HPRE and HTRAIL are in the range [0..15] and HPRE + PL + HTRAIL must be multiple of 16 for the JPEG 4:2:2 or 4:2:0 mode
The number of lines (NL) + VPRE + VTRAIL must be aligned with the chosen chroma sub-sampling format:
- • VPRE and VTRAIL are in the range [0..7] and VPRE + NL + VTRAIL must be multiple of 8 for the JPEG 4:4:4 or 4:2:2 mode
- • VPRE and VTRAIL are in the range [0..15] and VPRE + NL + VTRAIL must be multiple of 16 for the JPEG 4:2:0 mode
Figure 95. DMA2D image parameters with skipping
![Diagram illustrating DMA2D image parameters with skipping. It shows a 2D grid representing an image. The horizontal axis represents pixels, and the vertical axis represents lines. A dashed rectangle outlines the entire image area. Within this, a solid rectangle represents the 'Working Area' (PL & NL common to all layers). The diagram labels various parameters: 'Base address MA[31:0]' points to the top-left corner. 'HPRE (pixel)' is the skip at the start of a line. 'PL (pixel)' is the pixel pitch. 'HTRAIL (pixel)' is the skip at the end of a line. 'VPRE (line)' is the skip at the start of an image. 'NL (line)' is the total number of lines. 'VTRAIL (line)' is the skip at the end of an image. A shaded region within the working area is labeled 'Data fetch but not propagated in the pipeline'. A smaller rectangle at the bottom is labeled 'LO (Pixel or byte)'. Arrows indicate the direction of data flow.](/RM0517-STM32H5E4-5F4-5E5-5F5/5601010fb2387d5cf03ebe8196036963_img.jpg)
MSv74130V1
17.3.9 DMA2D stenciling stage (pre-blend or post-blend)
The DMA2D support 1 bpp up to 8 bpp stencil on foreground or background layer or on the output of the blender.
The source (SRC) field of the DMA2D stencil buffer control register (DMA2D_SBCR) defined on which layer the stencil buffer is allocated to. It can be either:
- • Foreground layer
- • Background layer
- • Blender output
The format of the stencil is configured in the mode (MODE) field of the DMA2D stencil buffer control register (DMA2D_SBCR) and can be either 1 bpp, 2 bpp, 4 bpp and 8 bpp.
The stencil buffer description is done as for the foreground and background plane through the following registers:
- • Stencil buffer memory address register (DMA2D_SBMAR)
- • Stencil buffer offset register (DMA2D_SBOR)
- • Stencil buffer memory skip register (DMA2D_SBMSR)
Please refer to foreground and background plane section for a detailed description
Once configured and linked for the foreground or background layer or the blender output, the emitted pixel from the stenciling is a pixel with an alpha value modified according to the stencil alpha value. The color value of the pixel is not changed.
The final alpha value of the emitted pixel is the multiplication of the original alpha of the pixel by the alpha given by the stencil buffer.
17.3.10 DMA2D scaling stage (pre-blend or post-blend)
The DMA2D scaler is a pixel decimator allowing down-scaling on foreground or background layer or on the output of the blender.
The source (SRC) field of the DMA2D scaler control register (DMA2D_SCR) defined on which layer the scaler is allocated to. It can be either:
- • Foreground layer
- • Background layer
- • Blender output
When the scaler is used, the size of the layer on which the scaler is applying is different from the size defined in the DMA2D number of line register (DMA2D_NLR). In this case, the size of the layer on which the scaler is applying is taken from the DMA2D scaler number of line register (DMA2D_SNLR).
Table 146 gives which register defines the size of the foreground layer, background layer, and output layer depending on the source (SRC) field of the DMA2D scaler control register (DMA2D_SCR).
Table 146. Layer size definition vs scaler mode
| Source (SRC) | Foreground | Background | Output | |
|---|---|---|---|---|
| 00 | No scaler | DMA2D_NLR | DMA2D_NLR | DMA2D_NLR |
| 01 | Scale foreground | DMA2D_SNLR | DMA2D_NLR | DMA2D_NLR |
| 10 | Scale background | DMA2D_NLR | DMA2D_SNLR | DMA2D_NLR |
| 11 | Scale blender output | DMA2D_SNLR | DMA2D_SNLR | DMA2D_NLR |
The scaling ratio is defined by the HSTEP and VSTEP of the DMA2D scaler step register (DMA2D_SSR).
The scaler phase can also be initialized to a nonzero value to support partial redrawing of scaled images. The horizontal and vertical phases can be set using the HPHASE and VPHASE field of the DMA2D scaler phase register (DMA2D_SPR).
Once the scaler is enabled on a layer or on the output of the blender, pixels are decimated according to a 12-bit horizontal scale counter and lines are decimated according to a 12-bit vertical scale counter.
For each pixel, the horizontal scale counter is incremented by the HSTEP+1 value of the DMA2D scaler step register (DMA2D_SSR). If the horizontal counter overflows, the pixel is emitted, if not, the pixel is discarded.
As the counters are on 12-bit, the scaling factor can go from 4096/4096 down to 1/4096. As an example, the layer needs to be downscaled by 2 horizontally (x0.5), the horizontal step value must be set to 0,5*4096 = 2048 so HSTEP = 2048-1 = 2047 = 0x7FF.
The initial value of the horizontal scale counter can be programmed with the HPHASE value of the DMA2D scaler phase register (DMA2D_SPR). This allows partial redrawing of scaled images.
For each line, the same process is applied with the vertical scale counter incremented by the VSTEP+1 value. If the vertical counter overflows, the line is emitted, if not, the line is discarded.
As for the horizontal counter, the initial value of the vertical scale counter can be programmed with the VPHASE value of the DMA2D scaler phase register (DMA2D_SPR).
In case the programmed size in the DMA2D scaler number of line register (DMA2D_SNLNR) is greater than the number of produced pixels, the last generated pixel is repeated to fill the gap.
17.3.11 DMA2D buffer/rotate stage
The DMA2D embeds 16×16 pixels tile buffers to handle the following operations
- • X mirroring
- • Y mirroring
- • X/Y index swap
This buffer is used to do any kind of mirroring or 90°/180°/270° rotations.
When using a tile buffer, the DMA2D operates in tile mode. The size of the tile is fixed to 16×16 (except for JPEG with 4:4:4 sub-sampling where the tile size is 8×8 and 4:2:2 sub-sampling where the tile size is 16×8).
The source (SRC) field of the DMA2D tile buffer control register (DMA2D_TBCR) defined on which layer the tile buffer is allocated to. It can be either:
- • Foreground layer
- • Background layer
- • Blender output
The operation done by the tile buffers is selected by setting the following bits in the DMA2D tile buffer control register (DMA2D_TBCR):
- • X mirroring enable (XMEN) to enable X mirroring
- • Y mirroring enable (YMEN) to enable Y mirroring
- • X/Y swap enable (XYSEN) to swap X and Y index
Once configured and linked for the foreground or background layer or the blender output, the emitted pixels from the tile buffer are in the order shown in Figure 92 and Figure 17.3.23.
Note that X/Y swap is also swapping the values of the width and the height of the foreground and/or background layer depending on the chosen source for the tile buffer. As a consequence when X/Y swap is used the number of lines (NL) field of the DMA2D_NLR is limited to 14-bit.
Table 147. Layer size definition in DMA2D_NLR vs tile buffer mode
| X/Y Swap | Source (SRC) | Foreground | Background | Output | |||
|---|---|---|---|---|---|---|---|
| Width | Height | Width | Height | Width | Height | ||
| No | Any | PL | NL | PL | NL | PL | NL |
| Yes | Foreground | NL | PL | PL | NL | ||
| Background | PL | NL | NL | PL | |||
| Blender | NL | PL | NL | PL | |||
Figure 96. Tile buffer operations XYSEN = 0

| Input | Output | |
|---|---|---|
XMEN = 0 Blit | ||
XMEN = 1 Mirroring | ||
XMEN = 0 Rotation 180° | ||
XMEN = 1 Rotation 180° |
MSv74131V3
Figure 97. Tile buffer operations XYSEN = 1

| Input | Output | |
|---|---|---|
XMEN = 0 | ||
XMEN = 1 | ||
XMEN = 0 | ||
XMEN = 1 |
MSv74132V3
17.3.12 DMA2D YCBCR PFC stage / JPEG decoding
The DMA2D foreground and background layers can support 8×8 block-based YCBCR as output by the JPEG decoder with different chroma sub-sampling factors.
This mode must be used in conjunction with a tile buffer as the Y, the Cb and the Cr data are accumulated in a tile buffer before the YCBCR to RGB conversion.
The memory organization follows the standard JFIF rules:
- • Each of the three color components must be coded on 8 bits.
- • Each component must be arranged by blocks of 8×8 (64 bytes).
- • Each block of 8×8 are arranged by MCU (minimum coded unit).
Depending on the chroma sub-sampling factor, the block making an MCU is arranged in the memory as described in the table below.
Table 148. MCU order in memory
| Offset | +0 | +64 | +128 | +192 | +256 | +320 | +384 | +448 | +512 | +576 | +640 | +704 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 4:4:4 | MCU1 (8×8 pixels) | MCU2 (8×8 pixels) | MCU3 (8×8 pixels) | MCU4 (8×8 pixels) | ||||||||
| Y1,1 | Cb1,1 | Cr1,1 | Y2,1 | Cb2,1 | Cr2,1 | Y3,1 | Cb3,1 | Cr3,1 | Y4,1 | Cb4,1 | Cr4,1 | |
| 4:2:2 | MCU1 (16×8 pixels) | MCU2 (16×8 pixels) | MCU3 (16×8 pixels) | |||||||||
| Y1,1 | Y2,1 | Cb1/2,1 | Cr1/2,1 | Y3,1 | Y4,1 | Cb3/4,1 | Cr3/4,1 | Y5,1 | Y6,1 | Cb5/6,1 | Cr5/6,1 | |
| 4:2:0 | MCU1 (16×16 pixels) | MCU2 (16×16 pixels) | ||||||||||
| Y1,1 | Y2,1 | Y1,2 | Y2,2 | Cb1/2,1/2 | Cr1/2,1/2 | Y3,1 | Y4,1 | Y3,2 | Y4,2 | Cb3/4,1/2 | Cr3/4,1/2 | |
Foreground or background plane is configured in JPEG mode setting the color mode (CM) field of the DMA2D foreground pixel format converter configuration register (DMA2D_FGPFCCR) or DMA2D background pixel format converter configuration register (DMA2D_BGPFFCR).
The chroma sub-sampling factor is configured through chroma sub-sampling (CSS) field in DMA2D_FGPFCCR or the DMA2D_BGPFFCR.
The address of the JPEG source programmed in the DMA2D foreground memory address register (DMA2D_FGMAR) or in the DMA2D background memory address register (DMA2D_BGMAR) points to the beginning of a JPEG MCU.
The line offset (LO) for the layer configured in JPEG format must be multiple of the size of an MCU:
- • Multiple of 64 pixels or 192 bytes in 4:4:4 mode
- • Multiple of 128 pixels or 256 bytes in 4:2:2 mode
- • Multiple of 256 pixels or 384 bytes in 4:2:0 mode
As a consequence the maximum JPEG width is
- • In 4:4:4 mode: 2048 pixels when the line offset is expressed in pixel and 2728 when the line offset is expressed in bytes.
- • In 4:2:2 mode: 2048 pixels when the line offset is expressed in pixel and 4096 when the line offset is expressed in bytes.
- • In 4:2:0 mode: 1024 pixels when the line offset is expressed in pixel and 2720 when the line offset is expressed in bytes.
The pixel skipper must be programmed to skip the necessary number of lines and pixels at the beginning and the end of the image to have an integer number of MCU processed.
As a consequence, the number of pixels per line (PL) + HPRE + HTRAIL must be aligned with the chosen sub-sampling format:
- • HPRE and HTRAIL are in the range [0..7] and HPRE + PL + HTRAIL must be multiple of 8 for the 4:4:4 mode
- • HPRE and HTRAIL are in the range [0..15] and HPRE + PL + HTRAIL must be multiple of 16 for the 4:2:2 and 4:2:0 modes
- • VPRE and VTRAIL are in the range [0..7] and VPRE + NL + VTRAIL must be multiple of 8 for the 4:4:4 and 4:2:2 modes
- • VPRE and VTRAIL are in the range [0..15] and VPRE + NL + VTRAIL must be multiple of 16 for the 4:2:0 mode
If the JPEG mode is selected for a given layer, it's not possible to select it for the other one (a configuration error is generated).
Once JPEG mode is selected:
- • The DMA2D is automatically configured to operate in tile mode.
- • The DMA2D tile size is automatically configured to 8×8 (4:4:4 sub-sampling), 16×8 (4:2:2 sub-sampling) or to 16×16 (4:2:0 sub-sampling).
The tile buffer must be linked to the foreground or background setting source (SRC) field of the DMA2D tile buffer control register (DMA2D_TBCR). If no tile buffer is linked to the configured layer, a configuration error is generated.
17.3.13 DMA2D blender stage
The DMA2D blender blends the source pixels by pair to compute the resulting pixel.
The blending is performed according to the following equation:
Division is rounded to the nearest lower integer
No configuration register is required by the blender. The blender use depends on the DMA2D operating mode defined by MODE[2:0] in DMA2D_CR.
17.3.14 DMA2D output PFC stage
The output PFC performs the pixel format conversion from 32 bits to the output format defined by CM[3:0] in DMA2D_OPFCCR.
Supported output formats are given in the table below
Table 149. Supported color mode in output
| CM[3:0] | Color mode |
|---|---|
| 0000 | ARGB8888 |
| 0001 | RGB888 |
| 0010 | RGB565 |
| 0011 | ARGB1555 |
| 0100 | ARGB4444 |
| 1110 | ARGB2222 |
| others | Reserved |
Note: To support the alternate format, the calculated alpha value can be inverted by setting AI bit in DMA2D_OPFCCR. This applies also to the Alpha value used in DMA2D_OCOLR.
The R and B fields can also be swapped setting RBS in DMA2D_OPFCCR, and the Alpha position can be changed setting the APOS in DMA2D_OPFCCR. This applies also to the RGB order used in DMA2D_OCOLR.
17.3.15 DMA2D write stage
The output FIFO programs the pixels according to the color format defined in the output PFC.
The destination area is defined through the following registers:
- • DMA2D output memory address register (DMA2D_OMAR)
- • DMA2D output offset register (DMA2D_OOR)
- • DMA2D number of lines register (number of lines and pixels per line) (DMA2D_NLR)
If the DMA2D operates in register-to-memory mode, the configured output rectangle is filled by the color specified in DMA2D_OCOLR.
The format is selected by CM[2:0] in DMA2D_OPFCCR.
The data are stored into the memory in the order defined in the table below.
Table 150. Data order in memory
| Color mode | @ + 3 | @ + 2 | @ + 1 | @ + 0 |
|---|---|---|---|---|
| ARGB8888 | A0[7:0] | R0[7:0] | G0[7:0] | B0[7:0] |
| RGB888 | B1[7:0] | R0[7:0] | G0[7:0] | B0[7:0] |
| G2[7:0] | B2[7:0] | R1[7:0] | G1[7:0] | |
| R3[7:0] | G3[7:0] | B3[7:0] | R2[7:0] | |
| RGB565 | R1[4:0]G1[5:3] | G1[2:0]B1[4:0] | R0[4:0]G0[5:3] | G0[2:0]B0[4:0] |
| ARGB1555 | A1[0]R1[4:0]G1[4:3] | G1[2:0]B1[4:0] | A0[0]R0[4:0]G0[4:3] | G0[2:0]B0[4:0] |
| ARGB4444 | A1[3:0]R1[3:0] | G1[3:0]B1[3:0] | A0[3:0]R0[3:0] | G0[3:0]B0[3:0] |
| ARGB2222 | A3[1:0]R3[1:0]G3[1:0]B3[1:0] | A2[1:0]R2[1:0]G2[1:0]B2[1:0] | A1[1:0]R1[1:0]G1[1:0]B1[1:0] | A0[1:0]R0[1:0]G0[1:0]B0[1:0] |
The RGB888 aligned on 32 bits is supported through the ARGB8888 mode.
For ARGB and RGB color formats, the component order can be modified by the Red/Blue swap (RBS) bit and/or the Alpha position (APOS) Table 151: ARGB/RGB component reordering.
Table 151. ARGB/RGB component reordering| RBS = 0, APOS = 0 | RBS = 1, APOS = 0 | RBS = 0, APOS = 1 | RBS = 1, APOS = 1 |
|---|---|---|---|
| ARGB8888 | ABGR8888 | RGBA8888 | BGRA8888 |
| RGB888 | BGR888 | RGB888 | BGR888 |
| RGB565 | BGR565 | RGB565 | BGR565 |
| ARGB1555 | ABGR1555 | RGBA5551 | BGRA5551 |
| ARGB4444 | ABGR4444 | RGBA4444 | BGRA4444 |
| ARGB2222 | ABGR2222 | RGBA2222 | BGRA2222 |
17.3.16 DMA2D output FIFO byte reordering
The output FIFO bytes can be reordered to support display frame buffer update through a parallel interface (F(S)MC) directly from the DMA2D.
The reordering of bytes can be done using:
- • RBS bit to swap red and blue component
- • SB bit to swap bytes two by two in the output FIFO
When the byte swapping is activated (SB = 1 in DMA2D_OPFCCR), the number of pixels per line (PL field in DMA2D_NLR) must be even, and the output memory address (MA field in DMA2D_OMAR) must be even. The output line offset computed in bytes (resulting from LOM field in DMA2D_CR and LO field in DMA2D_OOR values) must also be even. If not a configuration error is detected.
It is not possible to use the swap bytes feature when the tile buffer is used or in memory-to-memory mode.
Table 152. Standard data order in memory| Color Mode | @ + 3 | @ + 2 | @ + 1 | @ + 0 |
|---|---|---|---|---|
| RGB888 | B1[7:0] | R0[7:0] | G0[7:0] | B0[7:0] |
| G2[7:0] | B2[7:0] | R1[7:0] | G1[7:0] | |
| R3[7:0] | G3[7:0] | B3[7:0] | R2[7:0] | |
| RGB565 | R1[4:0]G1[5:3] | G1[2:0]B1[4:0] | R0[4:0]G0[5:3] | G0[2:0]B0[4:0] |
16-bit mode (RGB565)
This mode is supported without byte reordering by the DMA2D.
Figure 98. Intel 8080 16-bit mode (RGB565)

The diagram illustrates the Intel 8080 16-bit mode (RGB565). It shows a 16-bit Data Bus with lines D15 through D0. Arrows point from these lines to a row of 16 color bits. The first 5 bits (D15 to D11) are Red (R4 to R0), the next 6 bits (D10 to D5) are Green (G5 to G0), and the last 5 bits (D4 to D0) are Blue (B4 to B0). The total number of colors is 64K.
18/24-bit mode (RGB888)
This mode needs data reordering:
- 1. The red and the blue have to be swapped (setting the RBS bit).
- 2. MSB and the LSB bytes of a half-word must be swapped (setting SB bit).
Figure 99. Intel 8080 18/24-bit mode (RGB888)

The diagram illustrates the Intel 8080 18/24-bit mode (RGB888). It shows two 16-bit Data Transfers (labeled 1 and 2) on the Data Bus (D15 to D0). Transfer 1 maps to the first pixel's colors: R7-R0 (Red), G7-G0 (Green), and B7-B0 (Blue). Transfer 2 maps to the second pixel's colors: R6-R0 (Red), G6-G0 (Green), and B6-B0 (Blue). The total number of colors is 16.7M.
Table 153. Output FIFO byte reordering steps
| Steps | @ + 3 | @ + 2 | @ + 1 | @ + 0 |
|---|---|---|---|---|
| Original data ordering | B1[7:0] | R0[7:0] | G0[7:0] | B0[7:0] |
| G2[7:0] | B2[7:0] | R1[7:0] | G1[7:0] | |
| R3[7:0] | G3[7:0] | B3[7:0] | R2[7:0] | |
| Setting the RBS bit | ||||
| Data ordering after Red and Blue swap (RBS set) | R1[7:0] | B0[7:0] | G0[7:0] | R0[7:0] |
| G2[7:0] | R2[7:0] | B1[7:0] | G1[7:0] | |
| B3[7:0] | G3[7:0] | R3[7:0] | B2[7:0] | |
| Steps | @ + 3 | @ + 2 | @ + 1 | @ + 0 |
|---|---|---|---|---|
| Setting the SB bit | ||||
| Data ordering after byte swapping (SB set) | B0[7:0] | R1[7:0] | R0[7:0] | G0[7:0] |
| R2[7:0] | G2[7:0] | G1[7:0] | B1[7:0] | |
| G3[7:0] | B3[7:0] | B2[7:0] | R3[7:0] | |
17.3.17 Watermark
A watermark can be programmed to generate an interrupt when the last pixel of a given line has been written to the destination memory area.
The line number is defined in LW[15:0] in DMA2D_LWR.
When the last pixel of this line has been transferred, TWIF flag is raised in DMA2D_ISR, and an interrupt is generated if TWIE is set in DMA2D_IER.
17.3.18 DMA2D AHB master port timer
An 8-bit timer is embedded into the AHB master port to provide an optional limitation of the bandwidth on the crossbar. This timer is clocked by the AHB clock and counts a dead time between two consecutive accesses. This limits the bandwidth usage.
This timer can be enabled by setting EN in DMA2D_AMTCR.
The dead time between two consecutive AHB accesses can be programmed in dead time (DT) field of the DMA2D AHB master timer configuration register (DMA2D_AMTCR). This value represents the guaranteed minimum number of cycles between two consecutive transactions on AHB bus.
The update of the dead-time value while the DMA2D is running is taken into account for the next AHB transfer.
17.3.19 DMA2D configuration
Both source and destination data transfers can target peripherals and memories in the whole 4-Gbyte memory area, at addresses ranging between 0x0000 0000 and 0xFFFF FFFF.
The DMA2D can operate in any of the following modes selected through MODE[2:0] in DMA2D_CR:
- • Register-to-memory
- • Memory-to-memory
- • Memory-to-memory with PFC
- • Memory-to-memory with PFC and blending
- • Memory-to-memory with PFC, blending, and fixed FG color
- • Memory-to-memory with PFC, blending, and fixed BG color
Register-to-memory
The register-to-memory mode is used to fill a user-defined area with a predefined color. The color format is set in DMA2D_OPFCCR.
The DMA2D does not perform any data fetching from any source. It just writes the color defined in DMA2D_OCOLR to the area located at the address pointed by DMA2D_OMAR and defined in DMA2D_NLR and DMA2D_OOR.
Memory-to-memory
In memory-to-memory mode, the DMA2D does not perform any graphical data transformation. The foreground input FIFO acts as a buffer, and data are transferred from the source memory location defined in DMA2D_FGMAR, to the destination memory location pointed by DMA2D_OMAR.
The color mode programmed by CM[3:0] in DMA2D_FGPFCCR defines the number of bits per pixel for both input and output. This is used to count the number of data according to the value defined in pixels like the number of pixels per line. As a consequence:
- • The chosen color mode must be greater than 8 bpp.
- • The color ordering is meaningless (L8 does the same than A8; AL88 does the same than RGB565).
In this specific mode, the PFC, the pixel skipper, and the stenciling is not active on the foreground, and no other processing blocks are available: the input FIFO is directly connected to the output FIFO.
The size of the area to be transferred is defined by DMA2D_NLR and DMA2D_FGOR for the source, and by DMA2D_NLR and DMA2D_OOR for the destination.
Memory-to-memory with PFC
In this mode, the DMA2D performs a pixel format conversion of the source data, and stores them in the destination memory location.
The size of the areas to be transferred is defined by DMA2D_NLR and DMA2D_FGOR for the source, and by DMA2D_NLR and DMA2D_OOR for the destination.
Data are fetched from the location defined in DMA2D_FGMAR, and processed by the foreground PFC. The original pixel format is configured through DMA2D_FGPFCCR.
If the original pixel format is direct-color mode, the color channels are all expanded to 8 bits.
If the pixel format is indirect color mode, the associated CLUT has to be loaded into the CLUT memory.
The CLUT loading can be done automatically by following the sequence below:
- 1. Set the CLUT address into DMA2D_FGCMAR.
- 2. Set the CLUT size with CS[7:0] in DMA2D_FGPFCCR.
- 3. Set the CLUT format CM[3:0] in DMA2D_FGPFCCR.
- 4. Start the CLUT loading by setting START in DMA2D_FGPFCCR.
Once the CLUT loading is complete, CTCIF flag in DMA2D_ISR is raised, and an interrupt is generated if CTCIE is set in DMA2D_IER. The automatic CLUT loading process cannot work in parallel with classical DMA2D transfers.
The CLUT can also be filled by the CPU or by any other master through the AHB register interface. The access to the CLUT is not possible when a DMA2D transfer is ongoing, and uses the CLUT (indirect color format).
In parallel to the color conversion process, the alpha value can be added or changed depending on the value programmed in DMA2D_FGPFCCR. If the original image does not
have an alpha channel, a default alpha value of 0xFF is automatically added to obtain a fully opaque pixel.
The alpha value is modified as follows according to AM[1:0] in DMA2D_FGPFCCR:
- • It is unchanged.
- • It is replaced by ALPHA[7:0] value in DMA2D_FGPFCCR.
- • It is replaced by the original value multiplied by ALPHA[7:0] value in DMA2D_FGPFCCR divided by 255.
The pixel skipper can be configured through the DMA2D_FGMSR.
The resulting 32-bit data are encoded by the output PFC into the format specified by CM[2:0] in DMA2D_OPFCCR. The output pixel format cannot be the indirect mode since no CLUT generation process is supported.
All the processing blocks can be added inside the pipeline with the following restriction:
- • Usage of the scaler is only allowed when the DMA2D is not operating in tile mode (no JPEG nor tile buffer usage).
A processing block is inserted in the pipeline configuring its SRC field of its configuration register.
Processed data are written into destination memory location pointed by DMA2D_OMAR.
Memory-to-memory with PFC and blending
In this mode, two sources are fetched in the foreground and background FIFOs from the memory locations defined by DMA2D_FGMAR and DMA2D_BGMAR respectively.
The two pixel format converters have to be configured as described in memory-to-memory mode. Their configurations can be different as each pixel format converter is independent and has its own CLUT memory.
Once each pixel has been converted into 32 bits by its respective PFC, all pixels are blended according to the equation below:
Division are rounded to the nearest lower integer
The resulting 32-bit pixel value is encoded by the output PFC according to the specified output format, and data are written into the destination memory location pointed by DMA2D_OMAR.
If the two input pixels are fully transparent, the resulting output pixel is also transparent and each R, G, B components are saturated to 0xFF.
All the processing blocks can be added inside the pipeline with the restriction detailed in the previous paragraph.
Memory-to-memory with PFC, blending, and fixed color FG
In this mode, only one source is fetched in the background FIFO from the memory location defined by DMA2D_BGMAR.
The value of the foreground color is given by DMA2D_FGCOLR, and the alpha value is set to 0xFF (opaque).
The alpha value can be replaced or modified according to AM[1:0] and ALPHA[7:0] in DMA2D_FGPFCCR.
The two pixel format converters have to be configured as described in memory-to-memory mode. Their configurations can be different as each pixel format converter is independent and has its own CLUT memory
Once each pixel has been converted into 32 bits by its respective PFC, all pixels are blended together. The resulting 32-bit pixel value is encoded by the output PFC according to the specified output format. Data are written into the destination memory location pointed by DMA2D_OMAR.
All the precessing blocks can be added inside the pipeline with the restriction detailed in the previous paragraph.
Memory-to-memory with PFC, blending, and fixed color BG
In this mode, only open source is fetched in the foreground FIFO from the memory location defined by DMA2D_FGMAR.
The value of the background color is given by DMA2D_BGCOLR, and the alpha value is set to 0xFF (opaque).
The alpha value can be replaced or modified according to AM[1:0] and ALPHA[7:0] in DMA2D_BGPFCCR.
The two pixel format converters have to be configured as described in memory-to-memory mode. Their configurations can be different as each pixel format converter is independent and has its own CLUT memory
Once each pixel has been converted into 32 bits by their respective PFCs, all pixels are blended together. The resulting 32-bit pixel value is encoded by the output PFC according to the specified output format. Data are written into the destination memory location pointed by DMA2D_OMAR.
All the precessing blocks can be added inside the pipeline with the restriction detailed in the previous paragraph.
17.3.20 DMA2D configuration error detection
The DMA2D checks that the configuration is correct before any transfer. The configuration error interrupt flag is set by hardware when a wrong configuration is detected when a new transfer/automatic loading starts. An interrupt is then generated if CEIE = 1 in DMA2D_IER.
The wrong configurations that can be detected are listed below:
- • Foreground CLUT automatic loading:
- – MA bits in DMA2D_FGCMAR are not aligned with CM in DMA2D_FGPFCCR.
- – CM in DMA2D_FGCMAR is not a direct color format (ARGB8888, RGB8888, RGB565, ARGB1555, ARGB4444, or ARGB2222).
- • Background CLUT automatic loading:
- – MA bits in DMA2D_BGCMAR are not aligned with CM in DMA2D_BGPFCCR.
- – CM in DMA2D_BGCMAR is not a direct color format (ARGB8888, RGB8888, RGB565, ARGB1555, ARGB4444, or ARGB2222).
- • Memory transfer (except in register-to-memory and memory-to-memory with blending and fixed color FG):
- – MA bits in DMA2D_FGMAR are not aligned with CM in DMA2D_FGPFCCR.
- – LO bits in DMA2D_FGOR are not aligned with CM in DMA2D_FGPFCCR when LOM = 0 (pixel counting) and color mode is 1 bpp, 2 bpp or 4 bpp.
- – DMA2D_FGMSR.HPRE + number of pixels + DMA2D_FGMSR.HTRAIL is not aligned with CM in DMA2D_FGPFCCR when color mode is 1 bpp, 2 bpp or 4 bpp.
- – DMA2D_FGMSR.HPRE + number of pixels + DMA2D_FGMSR.HTRAIL equal 0.
- – DMA2D_FGMSR.HPRE and DMA2D_FGMSR.HTRAIL are not in the range [0..7] when DMA2D_FGPFCCR.CM = A1, or not in the range [0..3] when DMA2D_FGPFCCR.CM = A2, or not in the range [0..1] when DMA2D_FGPFCCR.CM = A4 or L4.
- – CM bits in DMA2D_FGPFCCR are set to reserved value.
- – AM bits in DMA2D_FGPFCCR are set to reserved value.
- • Memory transfer (only in blending and blending with fixed color FG mode):
- – MA bits in DMA2D_BGMAR are not aligned with CM in DMA2D_BGPFCCR.
- – LO bits in DMA2D_BGOR are not aligned with CM in DMA2D_BGPFCCR when LOM = 0 (pixel counting) and color mode is 1 bpp, 2 bpp or 4 bpp.
- – DMA2D_BGMSR.HPRE + number of pixels + DMA2D_BGMSR.HTRAIL is not aligned with CM in DMA2D_BGPFCCR when color mode is 1 bpp, 2 bpp or 4 bpp.
- – DMA2D_BGMSR.HPRE + number of pixels + DMA2D_BGMSR.HTRAIL equal 0.
- – DMA2D_BGMSR.HPRE and DMA2D_BGMSR.HTRAIL are not in the range [0..7] when DMA2D_BGPFCCR.CM = A1, or are not in the range [0..3] when DMA2D_BGPFCCR.CM = A2, or are not in the range [0..1] when DMA2D_BGPFCCR.CM = A4 or L4.
- – CM bits in DMA2D_BGPFCCR are set to reserved value.
- – AM bits in DMA2D_BGPFCCR are set to reserved value.
- • Memory transfer (except in memory-to-memory):
- – MA bits in DMA2D_OMAR are not aligned with CM in DMA2D_OPFCCR.
- – CM bits in DMA2D_OPFCCR are set to reserved value.
- • Memory transfer (memory-to-memory):
- – MA bits in DMA2D_OMAR are not aligned with CM in DMA2D_FGPFCCR.
- – LO bits in DMA2D_OOR are not aligned with CM in DMA2D_FGPFCCR when LOM = 0 (pixel counting) and color mode is 1 bpp, 2 bpp or 4 bpp.
- – CM bits in DMA2D_FGPFCCR are set to JPEG.
- • Memory transfer (except register-to-memory and memory-to-memory)
- – Tile buffer and the scaler are both active.
- • Any transfer (with byte swapping enabled):
- – PL bits in DMA2D_NLR are odd, or MA bits in DMA2D_OMAR are odd, or LO in bytes (resulting from LOM in DMA2D_CR and LO in DMA2D_OOR) are odd while SB = 1 in DMA2D_OPFCCR.
- • Any transfer:
- – NL bits in DMA2D_NLR are all zeros.
- – PL bits in DMA2D_NLR are all zeros.
- – MODE bits in DMA2D_CR are invalid.
- • Transfers with stencil buffer:
- – DMA2D_SBMSR.HPRE + number of pixels + DMA2D_SBMSR.HTRAIL is not aligned with MODE in DMA2D_SBCR when mode is 1 bpp, 2 bpp or 4 bpp.
- – DMA2D_SBMSR.HPRE and DMA2D_SBMSR.HTRAIL are not in the range [0..7] when DMA2D_SBCR.MODE = 1bpp, or are not in the range [0..3] when DMA2D_SBCR.MODE = 2bpp, or are not in the range [0..1] when DMA2D_SBCR.MODE = 4bpp.
- – LO bits in DMA2D_SBCR are not aligned with MODE in DMA2D_SBCR when LOM = 0 (pixel counting) and color mode is 1 bpp, 2 bpp or 4 bpp.
- • Transfers with JPEG on foreground (memory-to-memory with PFC, memory-to-memory with blending and memory-to-memory with blending and fixed color BG):
- – JPEG also enabled on background (only for memory-to-memory with PFC).
- – JPEG enabled DMA2D_FGPFCCR.CM = JPEG and DMA2D_FGPFCCR.CSS is set to a reserved value.
- – JPEG enabled DMA2D_FGPFCCR.CM = JPEG and the tile buffer is not linked to the foreground DMA2D_TBCR.SRC ≠ 1.
- – DMA2D_FGMSR.HPRE + number of pixels + DMA2D_FGMSR.HTRAIL is not aligned with the MCU width (8 when DMA2D_FGPFCCR.CSS = 4:4:4 and 16 when DMA2D_FGPFCCR.CSS = 4:2:2 or 4:2:0).
- – DMA2D_FGMSR.HPRE and DMA2D_FGMSR.HTRAIL are not in the range [0..7] when DMA2D_FGPFCCR.CSS = 4:4:4, or are not in the range [0..15] when DMA2D_FGPFCCR.CSS = 4:2:2 or 4:2:0.
- – DMA2D_FGMSR.VPRE + number of lines + DMA2D_FGMSR.VTRAIL is not aligned with the MCU height (8 when DMA2D_FGPFCCR.CSS = 4:4:4 or 4:2:2 and 16 when DMA2D_FGPFCCR.CSS = 4:2:0).
- – DMA2D_FGMSR.VPRE and DMA2D_FGMSR.VTRAIL are not in the range [0..7] when DMA2D_FGPFCCR.CSS = 4:4:4 or 4:2:2, or are not in the range [0..15] when DMA2D_FGPFCCR.CSS = 4:2:0.
- – LO bits in DMA2D_FGOR are not aligned to an MCU size when LOM = 0 (64 pixels when DMA2D_FGPFCCR.CSS = 4:4:4, 128 pixels when DMA2D_FGPFCCR.CSS = 4:2:2 and 256 pixels when DMA2D_FGPFCCR.CSS = 4:2:0).
- • Transfers with JPEG on background (memory-to-memory with blending and memory-to-memory with blending and fixed color FG):
- – JPEG also enabled on foreground (memory-to-memory with PFC).
- – JPEG enabled DMA2D_BGPFCCR.CM = JPEG and DMA2D_BGPFCCR.CSS is set to a reserved value.
- – JPEG enabled DMA2D_BGPFCCR.CM = JPEG and the tile buffer is not linked to the foreground DMA2D_TBCR.SRC ≠ 2.
- – DMA2D_BGMSR.HPRE + number of pixels + DMA2D_BGMSR.HTRAIL is not aligned with the MCU width (8 when DMA2D_BGPFCCR.CSS = 4:4:4 and 16 when DMA2D_BGPFCCR.CSS = 4:2:2 or 4:2:0).
- – DMA2D_BGMSR.HPRE and DMA2D_BGMSR.HTRAIL are not in the range [0..7] when DMA2D_BGPFCCR.CSS = 4:4:4, or are not in the range [0..15] when DMA2D_BGPFCCR.CSS = 4:2:2 or 4:2:0.
- – DMA2D_BGMSR.VPRE + number of lines + DMA2D_BGMSR.VTRAIL is not aligned with the MCU height (8 when DMA2D_BGPFCCR.CSS = 4:4:4 or 4:2:2 and 16 when DMA2D_BGPFCCR.CSS = 4:2:0).
- – DMA2D_BGMSR.VPRE and DMA2D_BGMSR.VTRAIL are not in the range [0..7] when DMA2D_BGPFCCR.CSS = 4:4:4 or 4:2:2, or are not in the range [0..15] when DMA2D_BGPFCCR.CSS = 4:2:0.
- – LO bits in DMA2D_BGOR are not aligned to an MCU size when LOM = 0 (64 pixels when DMA2D_BGPFCCR.CSS = 4:4:4, 128 pixels when DMA2D_BGPFCCR.CSS = 4:2:2 and 256 pixels when DMA2D_BGPFCCR.CSS = 4:2:0).
17.3.21 DMA2D transfer control (start, suspend, abort, and completion)
Once the DMA2D is configured, the transfer can be launched by setting START in DMA2D_CR. Once the transfer is completed, START is automatically reset, and TCIF flag is raised in DMA2D_ISR. An interrupt can be generated if TCIE is set in DMA2D_IER.
The user application can suspend the DMA2D at any time by setting SUSP in DMA2D_CR. The transaction can be aborted by setting ABORT in DMA2D_CR, or can be restarted by resetting SUSP in DMA2D_CR.
The user application can abort at any time an ongoing transaction by setting ABORT in DMA2D_CR. In this case, the TCIF flag is not raised.
It is not recommended to set START, SUSP, or ABORT at the same time. In such cases, ABORT is having the priority over the SUSP and START, and the SUSP is having the priority over the START.
17.3.22 DMA2D error management
Four kinds of error can be triggered:
- • AHB master port errors signaled by TEIF flag in DMA2D_ISR
- • Conflicts caused by CLUT access (CPU trying to access the CLUT while a CLUT loading or a DMA2D transfer using a CLUT is ongoing) signaled by CAEIF flag in DMA2D_ISR
- • Ring buffer error signaled by RBEIF flag in the DMA2D_ISR
- • Linear command list error signaled by LCLEIF in the DMA2D_ISR
Each flag is associated to its own interrupt enable flag in DMA2D_IER to generate an interrupt if need be (TEIE and CAEIE).
17.3.23 General purpose flags
The DMA2D offers four general purpose flags (GPFLAG) to generate various events for software or hardware synchronization including debug.
Each GPFLAG can be set or reset by:
- • CPU software
- • DMA2D software (command list instruction)
- • Hardware (internal triggers)
Each GPFLAG can:
- • Generate an interrupt
- • Generate a trigger
- • Suspend the command list execution
Each GPFLAG can be output on an individual pin for external triggering or debug.
Each of the four GPFLAG can be configured individually through the DMA2D general purpose flag configuration register (DMA2D_GPFCR).
The event of setting or resetting a GPFLAG (whatever by hardware or software) can set a general purpose flag x interrupt flag (GPFxIF) in the DMA2D interrupt and status register (DMA2D_ISR). The type of event setting the GPFxIF is defined by the general purpose flag x interrupt configuration (GPFxIC) field of the DMA2D general purpose flag configuration register (DMA2D_GPFCR).
When a GPFLAG is set, it can also suspend the command list execution. The behavior of the flag regarding the command list suspension is defined by the DMA2D general purpose flag x suspend configuration (DMA2D_GPFxSC) bit of the DMA2D general purpose flag configuration register (DMA2D_GPFCR).
The GPFLAG values are accessible by software through the DMA2D general purpose flag register (DMA2D_GPFR). This register is read only.
The set and the reset of the GPFLAG can be done by software setting the corresponding set general purpose flag x (SGPFx) resp. reset general purpose flag x (RGPFx) bits in the DMA2D general purpose flag set register (DMA2D_GPFSR) resp. DMA2D general purpose flag reset register (DMA2D_GPFRR). This can be done by the CPU or by an instruction in a DMA2D linear command list.
A GPFLAG can also be set or reset by hardware through external triggers. Because of resynchronization, a delay of 3 or 4 cycles can be observed between the hardware event and the effective action on the GPFLAG.
In case of concurrent set and reset events, the set has the priority.
Once set, a GPFLAG can suspend the command list execution if its corresponding DMA2D_GPFxSC bit is set. Refer to the Section 17.3.24: Command list management for additional information about command list suspension.
When the event selected by the corresponding GPFxIC occurs, the corresponding GPFxIF interrupt flag is set and an interrupt is generated if the general purpose flag x interrupt enable (GPFxIE) bit of the DMA2D interrupt enable register (DMA2D_IER) is set.
The GPFxIF flag can be reset by setting the clear general purpose flag x interrupt flag (CGPFxIF) bit of the DMA2D interrupt flag clear register (DMA2D_IFCR).
17.3.24 Command list management
The DMA2D is supporting command list for efficient graphic task management.
The command list management is done combining:
- • Ring buffer
- • Linear command lists
The ring buffer is a circular buffer in the system memory in which are stored the descriptors of the linear command list to be executed by the DMA2D.
The linear command lists are series of standard or SIMD instructions which are updating the internal registers of the DMA2D.
Figure 100. Ring buffer and linear command list

The diagram shows a 'Ring buffer' at the top, represented as a horizontal bar divided into segments. A 'Head Pointer' points to the beginning of the buffer, and a 'Write Pointer' points to the end. Three descriptors are shown within the buffer: 'Descriptor 1', 'Descriptor 2', and 'Descriptor 3'. Arrows from these descriptors point down to three separate 'Linear buffers' below. Each 'Linear buffer' is a vertical stack of instructions: 'Instruction 1', 'Instruction 2', 'Instruction 3', and 'End'. The first linear buffer has only three instructions, while the second has five. The third linear buffer has only 'Instruction 1' and 'End' shown. A dashed box encloses the 'Linear buffers' section. The label 'MSv74133V1' is in the bottom right corner of the diagram area.
Ring buffer configuration
The base address of the ring buffer is programmed in the DMA2D ring buffer memory address register (DMA2D_RBBAR). As each descriptor of the ring buffer is made of 64 bits, the DMA2D ring buffer memory address must be double-word aligned (64-bit).
The size of the ring buffer can be configured through the Ring buffer size (RBS) field of the DMA2D command list configuration register (DMA2D_CLCR) and can go from 64 bytes (8 descriptors) up to 8 Kbytes (1024 descriptors).
Ring buffer's linear command list descriptors
The linear command list descriptors are made of 64-bit with the following mapping.
Table 154. Linear command list descriptor
| Command list descriptor higher word @+0x04 | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| POSTGPF3 | POSTGPF2 | POSTGPF1 | POSTGPF0 | PREGPF3 | PREGPF2 | PREGPF1 | PREGPF0 | ||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | SIZE[11:0] | |||||||||||
| Command list descriptor lower word @ | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| ADDRESS[31:16] | |||||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| ADDRESS[15:0] | |||||||||||||||
- • The ADDRESS field is the address of the linear command list in the system memory. The address must be 32-bit aligned (ADDRESS[1] and ADDRESS[0] are ignored) The SIZE field is the size of the linear command list in words (number of words - 1) between 1 and 4096 words.
- • PREGPFx defines if an operation needs to be done on the GPFLAGx when prior to the start of the execution of the linear command list
- – 00: no operation
- – 01: set GPFLAGx
- – 10: reset GPFLAGx
- – 11: toggle GPFLAGx
- • POSTGPFx defines if on operation needs to be done on the GPFLAGx when after the execution of the linear command list
- – 00: no operation
- – 01: set GPFLAGx
- – 10: reset GPFLAGx
- – 11: toggle GPFLAGx
Linear command list instructions
The linear command list instructions can be the following:
- • NOP: No operation
- • LD: Load of an internal register
- • LDM: Load multiple of several internal registers
- • END: Mandatory at the end of the linear command list
If an LD or LDM instruction sets START bit of the DMA2D_CR, the START setting is buffered and is done once the LD/LDM instruction is finished. This is thus starting the DMA2D operation.
If an LD or LDM instruction sets START bit of the DMA2D_FGPFCCR or of the DMA2D_BGPFCR, the START setting is buffered and is done once the LD/LDM instruction is finished. This is thus starting the DMA2D CLUT transfer operation.
It is not allowed to set several START bit in the same LDM instruction. In such a case an error is generated.
NOP instruction
The no operation (NOP) instruction doesn't perform any operation. It can be used to reserve space inside a linear command list.
The total size in the linear command list of a NOP instruction is one word.
Table 155. NOP instruction coding
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| NOP | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
LD instruction
The load (LD) instruction makes a direct load into a DMA2D register.
The registers accessible with an LD instruction are all the register available for LDM (refer to Table 157: LDM instruction coding) and DMA2D_LWR, DMA2D_AMTCR, DMA2D_DPFCR, DMA2D_GPFSR and DMA2D_GPFRR.
Bit 11 to bit 0 define the 12-bit address of the register to be loaded.
After the instruction word, a data word is following with the value to be loaded.
The total size in the linear command list of an LD instruction is two words.
Table 156. LD instruction coding
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| LD | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ADDRESS[11:0] | |||||||||||
LD instruction example:
Load the DMA2D foreground memory address register (DMA2D_FGMAR) with 0x2400 0000:
- • Operation: LD DMA2D_FGMAR, 0x24000000
- • Binary: 0x8000 0040 - 0x2400 0000
LDM Instruction
The load multiple (LDM) instruction allows single instruction multiple data (SIMD) for DMA2D configuration.
Bit 31 of the instruction is always 0, whereas bit 30 to bit 0 are coding which registers or group of registers are to be loaded.
After the instruction word, a variable number of data words are following according to the number of registers to be loaded.
The order of the data word is fixed:
- • The DMA2D_CR selected by bit 30 is always the first one when selected.
- • The DMA2D_SNLR, DMA2D_SSR and DMA2D_SPR selected by bit 2 is always The latest ones when selected.
The total size in the linear command list of an LDM instruction is thus between one word (NOP) up to 30 words (update all 29 possible registers covered by LDM instruction).
Table 157: LDM instruction coding gives the correspondence between the instruction bit and the registers or group of registers to be loaded.
Table 157. LDM instruction coding| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| LDM | 0 | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | - | - | - | x | - | - | - | x | x | - | - |
| DMA2D_CR | x | |||||||||||||||||||||||||||||||
| DMA2D_IER | x | |||||||||||||||||||||||||||||||
| DMA2D_IFCR | x | |||||||||||||||||||||||||||||||
| DMA2D_FGMAR | x | |||||||||||||||||||||||||||||||
| DMA2D_FGOR | x | |||||||||||||||||||||||||||||||
| DMA2D_FGMSR | x | |||||||||||||||||||||||||||||||
| DMA2D_FGPFCCR | x | |||||||||||||||||||||||||||||||
| DMA2D_FGCOLR | x | |||||||||||||||||||||||||||||||
| DMA2D_FGCMAR | x | |||||||||||||||||||||||||||||||
| DMA2D_BGMAR | x | |||||||||||||||||||||||||||||||
| DMA2D_BGOR | x | |||||||||||||||||||||||||||||||
| DMA2D_BGMSR | x | |||||||||||||||||||||||||||||||
| DMA2D_BGPFCCR | x | |||||||||||||||||||||||||||||||
| DMA2D_BGCOLR | x | |||||||||||||||||||||||||||||||
| DMA2D_BGCMAR | x | |||||||||||||||||||||||||||||||
| DMA2D_OPFCCR | x | |||||||||||||||||||||||||||||||
| DMA2D_OCOLR | x | |||||||||||||||||||||||||||||||
| DMA2D_OMAR | x | |||||||||||||||||||||||||||||||
| DMA2D_OOR | x | |||||||||||||||||||||||||||||||
| DMA2D_NLR | x | |||||||||||||||||||||||||||||||
| DMA2D_SBCR | x | |||||||||||||||||||||||||||||||
| DMA2D_SBMAR | x | |||||||||||||||||||||||||||||||
| DMA2D_SBOR | x | |||||||||||||||||||||||||||||||
| DMA2D_SBMSR | x | |||||||||||||||||||||||||||||||
| DMA2D_TBCR | x | |||||||||||||||||||||||||||||||
| DMA2D_SCR | x | |||||||||||||||||||||||||||||||
| DMA2D_SNLR | x | |||||||||||||||||||||||||||||||
| DMA2D_SSR | x | |||||||||||||||||||||||||||||||
| DMA2D_SPR | x |
LDM instruction example:
Load the DMA2D_FGMAR with 0x2400 0000, the DMA2D_FGOR with 0x0000 0100
- • Operation: LDM DMA2D_FGMAR, 0x2400 0000, DMA2D_FGOR, 0x0000 0100
- • Binary: 0x0800 0000 - 0x2400 0000 - 0x0000 0100
Load the DMA2D_FGMAR with 0x0801 2000, the DMA2D_FGOR with 0x0000 0100, the DMA2D_OMAR with 0x2400 4000, the DMA2D_OOR with 0x0000 2000 and the DMA2D_NLR with 0x0040 0060
- • Operation: LDM DMA2D_FGMAR, 0x0801 2000, DMA2D_FGOR, 0x0000 0100, DMA2D_OMAR, 0x2400 4000, DMA2D_OOR, 0x0000 2000, DMA2D_NLR, 0x0040 0060
- • Binary: 0x0800 C000 - 0x0801 2000 - 0x0000 0100 - 0x2400 4000 - 0x0000 2000 - 0x0040 0060
END instruction
The end (END) instruction doesn't perform any operation. It is used to identify the end of a linear command list.
This instruction is mandatory and is counting in the size calculation of a linear command list.
The total size in the linear command list of an END instruction is one word.
Table 158. END instruction coding
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
| END | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Ring buffer and linear command list functional description
When a linear command list need to be submitted to the DMA2D, its 64-bit descriptor must be written into the ring buffer memory.
This new descriptor must be written in the first available free location pointed by the write pointer (WP) field of the DMA2D ring buffer write pointer register (DMA2D_RBWPR).
Once the descriptor is written, the WP field must be incremented to point to the new free available location. The WP field can be updated anytime even when the DMA2D is up and running.
The descriptor of the first command list to be executed is pointed by the head pointer (HP) field of the DMA2D ring buffer head pointer register (DMA2D_RBHPR).
This HP field can be updated by software when ring buffer execution is stopped, or automatically by hardware when the related linear command list execution is done. It cannot be updated by software when the ring buffer execution is running or suspended.
The WP and HP fields are offsets relative to the DMA2D ring buffer base address.
The ring buffer execution is started by setting the START bit of the (DMA2D_CLCR).
Once the head pointer (HP) becomes equal to the write pointer (WP) the DMA2D ring buffer execution is automatically stopped and the START bit is automatically reset and the command list complete flag (RBCF) of the DMA2D interrupt status register (DMA2D_ISR) is set.
If the command list complete interrupt enable (RBCIE) bit is set, an interrupt is generated.
Command list abort
The command list execution can be aborted by software setting the ABORT bit on the DMA2D command list control register (DMA2D_CLCR).
When the abort is requested, the abort is effective after the full execution of the current instruction (DMA2D operations are not aborted but finished prior to a command list execution effective abort).
Once the abort is effective, the START bit of the DMA2D command list control register (DMA2D_CLCR) is reset.
Command list execution suspension
The command list can be suspended by
- • software setting the suspend (SUSP) bit of the DMA2D command list control register (DMA2D_CLCR)
- • software/hardware when a GPFLAG is set and configured to suspend the command list execution
When a command list suspend condition occurs, the suspension is effective after the full execution of the current instruction (DMA2D operations are not suspended but finished prior to a command list execution effective suspension).
Once the command list suspension is effective, the command list suspend interrupt flag (CLSIF) bit of the DMA2D interrupt and status register (DMA2D_ISR) is set, and an interrupt is generated if the command list suspend interrupt enable (CLSIE) bit of the DMA2D interrupt enable register (DMA2D_IER) is set.
The state of the command list execution suspension is given by the suspend bits of the DMA2D command list status register (DMA2D_CLSR). The suspend bits are cleared once the corresponding suspending condition is clear.
It is not recommended to set START, SUSP, or ABORT at the same time. In such cases, ABORT is having the priority over the SUSP and START, and the SUSP is having the priority over the START.
Command list error management
When an error occurred during the command list execution, the START bit of the DMA2D_CLCR is automatically reset.
If the error is due to a DMA2D error (configuration error, CLUT access error or transfer errors), the corresponding error bit is set in DMA2D interrupt and status register (DMA2D_ISR) is set and an interrupt is generated if the corresponding enable bit in the DMA2D interrupt enable register (DMA2D_IER) is set.
If the error is related to the ring buffer reading, the ring buffer error interrupt flag (RBEIF) bit of the DMA2D interrupt and status register (DMA2D_ISR) is set and an interrupt is generated if the ring buffer error interrupt enable (RBEIE) bit of the DMA2D interrupt enable register (DMA2D_IER) is set.
A ring buffer error can be caused either by:
- • Descriptor read error: AHB error while reading the descriptor.
- • Ring buffer oversize: the ring buffer overflows the 4GB range.
- • Head pointer error: the programmed head pointer is outside the ring buffer.
- • Write pointer error: the programmed write pointer is outside the ring buffer.
If a ring buffer error occurs while the DMA2D is running (one of the START bit is set), the current operation is not aborted. It is recommended to either wait for the end of the operations (wait for the clear of the corresponding START bit) or to abort it manually setting the ABORT bit of the DMA2D control register (DMA2D_CR).
If the error is related to the linear command list execution, the command list error interrupt flag (CLEIF) bit of the DMA2D interrupt and status register (DMA2D_ISR) is set and an interrupt is generated if the command list error interrupt enable (CLEIE) bit of the DMA2D interrupt enable register (DMA2D_IER) is set.
The exact linear command list error is given by the error bits of the DMA2D command list status register (DMA2D_CLSR) and can be:
- • Linear command list read error, an abort of the current DMA2D operation, or a configuration error generated by the loaded instruction.
- • Illegal instruction or end of linear command list mismatch error (END instruction missing or not matching the size of the command list given in its descriptor)
- • Linear command list multiple start error (more than one START bit is set in a single linear command list instruction)
The error bits are automatically cleared when the CLEIF flag is cleared setting the clear command list error interrupt flag (CCLEIF) bit of the DMA2D interrupt flag clear register (DMA2D_IFCR).
17.4 DMA2D interrupts
An interrupt can be generated on the following events:
- • General purpose flag event
- • Command list error
- • Command list suspended
- • Ring buffer error
- • Ring buffer completed
- • Configuration error
- • CLUT transfer complete
- • CLUT access error
- • Transfer watermark reached
- • Transfer complete
- • Transfer error
Separate interrupt enable bits are available for flexibility.
Table 159. DMA2D interrupt requests
| Interrupt event | Event flag | Enable control bit |
|---|---|---|
| General purpose flag event | GPFxIF | GPFxIE |
| Command list error | CLEIF | CLEIE |
| Command list suspended | CLSIF | CLSIE |
| Ring buffer error | RBEIF | RBEIE |
| Ring buffer completed | RBCIF | RBCIE |
| Configuration error | CEIF | CEIE |
| CLUT transfer complete | CTCIF | CTCIE |
| CLUT access error | CAEIF | CAEIE |
| Transfer watermark | TWF | TWIE |
| Transfer complete | TCIF | TCIE |
| Transfer error | TEIF | TEIE |
17.5 DMA2D registers
17.5.1 DMA2D control register (DMA2D_CR)
Address offset: 0x000
Reset value: 0x0000 0000
This register configures and controls the DMA2D. The configuration part can only be written when data transfers or the command list execution are disabled. Once the data transfer or the command list execution has started, the configuration part of this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | MODE[2:0] | ||
| rw | rw | rw | |||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | LOM | Res. | Res. | Res. | ABORT | SUSP | START |
| rw | rs | rw | rs | ||||||||||||
Bits 31:19 Reserved, must be kept at reset value.
Bits 18:16 MODE[2:0]: DMA2D mode
This bit is set and cleared by software. It cannot be modified while a transfer is ongoing.
000: Memory-to-memory (FG fetch only)
001: Memory-to-memory with PFC (FG fetch only with FG PFC active)
010: Memory-to-memory with blending (FG and BG fetch with PFC and blending)
011: Register-to-memory (no FG nor BG, only output stage active)
100: Memory-to-memory with blending and fixed color FG (BG fetch only with FG and BG PFC active)
101: Memory-to-memory with blending and fixed color BG (FG fetch only with FG and BG PFC active)
110: Reserved
111: Reserved
Bits 15:7 Reserved, must be kept at reset value.
Bit 6 LOM: Line offset mode
This bit configures how the line offset is expressed (pixels or bytes) for the foreground, background and output.
This bit is set and cleared by software. It can not be modified while a transfer is ongoing.
0: Line offsets expressed in pixels
1: Line offsets expressed in bytes
Bits 5:3 Reserved, must be kept at reset value.
Bit 2 ABORT: Abort
This bit can be used to abort the current transfer. This bit is set by software, and is automatically reset by hardware when the START bit of the current operation is reset (data transfer or automatic CLUT loading).
0: No transfer abort requested
1: Transfer abort requested
Bit 1 SUSP: Suspend
This bit can be used to suspend the current transfer. This bit is set and reset by software. It is automatically reset by hardware when the START bit of the current operation is reset (data transfer or automatic CLUT loading).
0: Transfer not suspended
1: Transfer suspended
Bit 0 START: Start
This bit can be used to launch the DMA2D according to parameters loaded in the various configuration registers. This bit controls the DMA2D data transfer (not the automatic CLUT loading).
This bit is automatically reset by the following events:
- • At the end of the transfer
- • When the data transfer is aborted by the user by setting ABORT in this register
- • When a data transfer error occurs
- • When the data transfer has not started due to a configuration error, or another transfer operation already ongoing (automatic CLUT loading)
0: No DMA2D data transfer on going
1: DMA2D data transfer on going
17.5.2 DMA2D interrupt status register (DMA2D_ISR)
Address offset: 0x010
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | GPF3IF | GPF2IF | GPF1IF | GPF0IF |
| r | r | r | r | ||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | CLEIF | CLSIF | Res. | Res. | RBEIF | RBCIF | Res. | Res. | CEIF | CTCIF | CAEIF | TWIF | TCIF | TEIF |
| r | r | r | r | r | r | r | r | r | r |
Bits 31:20 Reserved, must be kept at reset value.
Bit 19 GPF3IF: General purpose flag 3 interrupt flag
This bit is set when general purpose flag 3 event is triggered and the flag is allowed to generate an interrupt.
0: No general purpose flag 3 event detected
1: General purpose flag 3 event detected
Bit 18 GPF2IF: General purpose flag 2 interrupt flag
This bit is set when general purpose flag 2 event is triggered and the flag is allowed to generate an interrupt.
0: No general purpose flag 2 event detected
1: General purpose flag 2 event detected
Bit 17 GPF1IF: General purpose flag 1 interrupt flag
This bit is set when general purpose flag 1 event is triggered and the flag is allowed to generate an interrupt.
0: No general purpose flag 1 event detected
1: General purpose flag 1 event detected
- Bit 16 GPF0IF: General purpose flag 0 interrupt flag
This bit is set when general purpose flag 0 event is triggered and the flag is allowed to generate an interrupt.
0: No general purpose flag 0 event detected
1: General purpose flag 0 event detected - Bits 15:14 Reserved, must be kept at reset value.
- Bit 13 CLEIF: Command list error interrupt flag
This bit is set when an error occurred during the command list execution.
0: No error detected during the command list execution
1: An error has been detected during the command list execution - Bit 12 CLSIF: Command list suspended interrupt flag
This bit is set when the command list execution is suspended.
0: Command list not suspended
1: Command list execution has been suspended - Bits 11:10 Reserved, must be kept at reset value.
- Bit 9 RBEIF: Ring buffer error interrupt flag
This bit is set when the ring buffer error occurred.
0: No error detected during the ring buffer execution
1: An error has been detected during the ring buffer execution - Bit 8 RBCIF: Ring buffer completed interrupt flag
This bit is set when the ring buffer execution is completed.
0: Ring buffer execution not yet completed
1: Ring buffer execution complete - Bits 7:6 Reserved, must be kept at reset value.
- Bit 5 CEIF: Configuration error interrupt flag
This bit is set when START is set in DMA2D_CR, DMA2D_FGPFCCR or DMA2D_BGPFCCR, and a wrong configuration has been programmed.
0: No configuration error detected
1: A configuration error has been detected - Bit 4 CTCIF: CLUT transfer complete interrupt flag
This bit is set when the CLUT copy from a system memory area to the internal DMA2D memory is complete.
0: CLUT transfer not yet complete
1: CLUT transfer complete - Bit 3 CAEIF: CLUT access error interrupt flag
This bit is set when the CPU accesses the CLUT while the CLUT is being automatically copied from a system memory to the internal DMA2D or while the CLUT is used by the current DMA2D operation.
0: No CLUT access error detected
1: CLUT transfer error detected - Bit 2 TWIF: Transfer watermark interrupt flag
This bit is set when the last pixel of the watermarked line has been transferred.
0: Transfer watermark not yet reached
1: Transfer watermark reached
Bit 1 TCIF: Transfer complete interrupt flag
This bit is set when a DMA2D transfer operation is complete (data transfer only).
0: DMA2D data transfer not yet complete
1: DMA2D data transfer transfer complete
Bit 0 TEIF: Transfer error interrupt flag
This bit is set when an error occurs during a DMA transfer (data transfer or automatic CLUT loading).
0: No DMA2D transfer error detected
1: DMA2D transfer error detected
17.5.3 DMA2D interrupt enable register (DMA2D_IER)
Address offset: 0x014
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | GPF3 IE | GPF2 IE | GPF1 IE | GPF0 IE |
| rw | rw | rw | rw | ||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | CLEIE | CLSIE | Res. | Res. | RBEIE | RBCIE | Res. | Res. | CEIE | CTCIE | CAEIE | TWIE | TCIE | TEIE |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:20 Reserved, must be kept at reset value.
Bit 19 GPF3IE: General purpose flag 3 interrupt enable
This bit is set and cleared by software.
0: GP flag 3 interrupt is disabled
1: GP flag 3 interrupt is enabled
Bit 18 GPF2IE: General purpose flag 2 interrupt enable
This bit is set and cleared by software.
0: GP flag 2 interrupt is disabled
1: GP flag 2 interrupt is enabled
Bit 17 GPF1IE: General purpose flag 1 interrupt enable
This bit is set and cleared by software.
0: GP flag 1 interrupt is disabled
1: GP flag 1 interrupt is enabled
Bit 16 GPF0IE: General purpose flag 0 interrupt enable
This bit is set and cleared by software.
0: GP flag 0 interrupt is disabled
1: GP flag 0 interrupt is enabled
Bits 15:14 Reserved, must be kept at reset value.
- Bit 13 CLEIE: Command list error interrupt enable
This bit is set and cleared by software.
0: Command list error interrupt is disabled
1: Command list error interrupt is enabled - Bit 12 CLSIE: Command list suspended interrupt enable
This bit is set and cleared by software.
0: Command list suspended interrupt is disabled
1: Command list suspended interrupt is enabled - Bits 11:10 Reserved, must be kept at reset value.
- Bit 9 RBEIE: Ring buffer error interrupt enable
This bit is set and cleared by software.
0: Ring buffer error interrupt is disabled
1: Ring buffer error interrupt is enabled - Bit 8 RBCIE: Ring buffer completed interrupt enable
This bit is set and cleared by software.
0: Ring buffer completed interrupt is disabled
1: Ring buffer completed interrupt is enabled - Bits 7:6 Reserved, must be kept at reset value.
- Bit 5 CEIE: Configuration error interrupt enable
This bit is set and cleared by software.
0: Configuration error interrupt is disabled
1: Configuration error interrupt is enabled - Bit 4 CTCIE: CLUT transfer complete interrupt enable
This bit is set and cleared by software.
0: CLUT transfer complete interrupt is disabled
1: CLUT transfer complete interrupt is enabled - Bit 3 CAEIE: CLUT access error interrupt enable
This bit is set and cleared by software.
0: CLUT access error interrupt is disabled
1: CLUT access error interrupt is enabled - Bit 2 TWIE: Transfer watermark interrupt enable
This bit is set and cleared by software.
0: Transfer watermark interrupt is disabled
1: Transfer watermark interrupt is enabled - Bit 1 TCIE: Transfer complete interrupt enable
This bit is set and cleared by software.
0: Transfer complete interrupt is disabled
1: Transfer complete interrupt is enabled - Bit 0 TEIE: Transfer error interrupt enable
This bit is set and cleared by software.
0: Transfer error interrupt is disabled
1: Transfer error interrupt is enabled
17.5.4 DMA2D interrupt flag clear register (DMA2D_IFCR)
Address offset: 0x018
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | CGPF3 IF | CGPF2 IF | CGPF1 IF | CGPF0 IF |
| w | w | w | r | ||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | CCL E IF | CCLS IF | Res. | Res. | CRBE IF | CRBC IF | Res. | Res. | CCEIF | CCTC IF | CCAE IF | CTWIF | CTCIF | CTEIF |
| w | w | w | w | w | w | w | w | w | w |
Bits 31:20 Reserved, must be kept at reset value.
Bit 19 CGPF3IF: Clear general purpose flag 3 interrupt flag
Setting this bit clears the GPF3IF flag in DMA2D_ISR.
0: Do nothing
1: Clear GPF3IF flag in DMA2D_ISR
Bit 18 CGPF2IF: Clear general purpose flag 2 interrupt flag
Setting this bit clears the GPF2IF flag in DMA2D_ISR.
0: Do nothing
1: Clear GPF2IF flag in DMA2D_ISR
Bit 17 CGPF1IF: Clear general purpose flag 1 interrupt flag
Setting this bit clears the GPF1IF flag in DMA2D_ISR.
0: Do nothing
1: Clear GPF1IF flag in DMA2D_ISR
Bit 16 CGPF0IF: Clear general purpose flag 0 interrupt flag
Setting this bit clears the GPF0IF flag in DMA2D_ISR.
0: Do nothing
1: Clear GPF0IF flag in DMA2D_ISR
Bits 15:14 Reserved, must be kept at reset value.
Bit 13 CCLEIF: Clear command list error interrupt flag
Setting this bit clears the CLEIF flag in DMA2D_ISR.
0: Do nothing
1: Clear CLEIF flag in DMA2D_ISR
Bit 12 CCLSIF: Clear command list suspended interrupt flag
Setting this bit clears the CLSIF flag in DMA2D_ISR.
0: Do nothing
1: Clear CLSIF flag in DMA2D_ISR
Bits 11:10 Reserved, must be kept at reset value.
Bit 9 CRBEIF: Clear ring buffer error interrupt flag
Setting this bit clears the RBEIF flag in DMA2D_ISR.
0: Do nothing
1: Clear RBEIF flag in DMA2D_ISR
Bit 8 CRBCIF: Clear ring buffer completed interrupt flag
Setting this bit clears the RBCIF flag in DMA2D_ISR.
0: Do nothing
1: Clear RBCIF flag in DMA2D_ISR
Bits 7:6 Reserved, must be kept at reset value.
Bit 5 CCEIF: Clear configuration error interrupt flag
Setting this bit clears the CEIF flag in DMA2D_ISR.
0: Do nothing
1: Clear CEIF flag in DMA2D_ISR
Bit 4 CCTCIF: Clear CLUT transfer complete interrupt flag
Setting this bit clears the CTCIF flag in DMA2D_ISR.
0: Do nothing
1: Clear CTCIF flag in DMA2D_ISR
Bit 3 CCAEIF: Clear CLUT access error interrupt flag
Setting this bit clears the CAEIF flag in DMA2D_ISR.
0: Do nothing
1: Clear CAEIF flag in DMA2D_ISR
Bit 2 CTWIF: Clear transfer watermark interrupt flag
Setting this bit clears the TWIF flag in DMA2D_ISR.
0: Do nothing
1: Clear TWIF flag in DMA2D_ISR
Bit 1 CTCIF: Clear transfer complete interrupt flag
Setting this bit clears the TCIF flag in DMA2D_ISR.
0: Do nothing
1: Clear TCIF flag in DMA2D_ISR
Bit 0 CTEIF: Clear transfer error interrupt flag
Setting this bit clears the TEIF flag in DMA2D_ISR.
0: Do nothing
1: Clear TEIF flag in DMA2D_ISR
17.5.5 DMA2D foreground memory address register (DMA2D_FGMAR)
Address offset: 0x040
Reset value: 0x0000 0000
This register can only be written when data transfers or the command list execution are disabled. Once the data transfer or the command list execution started, this register is read-only.
| RM0517 | column_2 | Bit 8 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 | CRBCIF CCEIF CCTCIF CCAEIF CTWIF CTCIF | 0: Do nothing 0: Do nothing 0: Do nothing 0: Do nothing 0: Do nothing 0: Do nothing | column_6 | column_7 | column_8 | column_9 | column_10 | column_11 | column_12 | column_13 | column_14 | column_15 | column_16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Bit 0 | CTEIF : Clear transfer error interrupt flag | ||||||||||||||
| 31 | 30 | only. 29 | 28 | 27 | 26 | 25 | 24 | 23 MA[31:16] | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 MA[15:0] | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
| RM0517 Rev 1 | 807/ | 3945 |
Bits 31:0 MA[31:0]: Memory address
Address of the data used for the layer image.
The address alignment must match the image format selected: a 32-bit per pixel format must be 32-bit aligned, a 16-bit per pixel format must be 16-bit aligned, and all other pixel format must be 8-bit aligned.
In JPEG mode, the address must be aligned with a MCU.
17.5.6 DMA2D foreground offset register (DMA2D_FGOR)
Address offset: 0x044
Reset value: 0x0000 0000
This register can only be written when data transfers or the command list execution are disabled. Once the data transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| LO[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:16 Reserved, must be kept at reset value.
Bits 15:0 LO[15:0]: Line offset
This field gives the line offset used for the layer image, expressed:
- • In pixels when LOM = 0 in DMA2D_CR. Only LO[13:0] bits are considered, LO[15:14] bits are ignored.
- • In bytes when LOM = 1
This value is used for the address generation. It is added at the end of each line to determine the starting address of the next line.
When the line offset is expressed in pixel, it must be mutiple of 2 if the image format is 4-bit per pixel, multiple of 4 if the image format is 2-bit per pixel and multiple of 8 if the image format is 1-bit per pixel.
17.5.7 DMA2D foreground memory skip register (DMA2D_FGMSR)
Address offset: 0x04C
Reset value: 0x0000 0000
This register can only be written when data transfers or the command list execution are disabled. Once the data transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | VTRAIL[3:0] | Res. | Res. | Res. | Res. | VPRE[3:0] | ||||||
| rw | rw | rw | rw | rw | rw | rw | rw | ||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | HTRAIL[3:0] | Res. | Res. | Res. | Res. | HPRE[3:0] | ||||||
| rw | rw | rw | rw | rw | rw | rw | rw | ||||||||
Bits 31:28 Reserved, must be kept at reset value.
Bits 27:24 VTRAIL[3:0]: Vertical trailing lines
In JPEG mode, this field specifies the number of lines fetched but skipped internally at the end of a surface.
Bits 23:20 Reserved, must be kept at reset value.
Bits 19:16 VPRE[3:0]: Vertical pre lines
In JPEG mode, this field specifies the number of lines fetched but skipped internally at the beginning of a surface.
Bits 15:12 Reserved, must be kept at reset value.
Bits 11:8 HTRAIL[3:0]: Horizontal trailing pixels
In JPEG mode, or in A1, A2, A4 or L4 mode, this field specifies the number of pixel fetched but skipped internally at the end of a line.
Bits 7:4 Reserved, must be kept at reset value.
Bits 3:0 HPRE[3:0]: Horizontal pre pixels
In JPEG mode, or in A1, A2, A4 or L4 mode, this field specifies the number of pixel fetched but skipped internally at the beginning of a line during.
17.5.8 DMA2D foreground PFC control register (DMA2D_FGPFCCR)
Address offset: 0x050
Reset value: 0x0000 0000
This register can only be written when data transfers or the command list execution are disabled. Once the data transfer or the command list execution started, this register is read-only.
| RM0517 17.5.8 | column_2 | Bits 27:24 Bits 19:16 Bits 11:8 Bits 3:0 only. | VPRE[3:0] HPRE[3:0] | VTRAIL[3:0] end of a surface. HTRAIL[3:0] | : Vertical pre lines | column_7 | column_8 | column_9 | column_10 | column_11 | column_12 | column_13 | column_14 | column_15 | column_16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| ALPHA[7:0] | Res. | APOS | RBS | AI | CSS[1:0] | AM[1:0] | |||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| CS[7:0] | Res. | Res. | START | Res. | CM[3:0] | ||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rs | rw | rw | rw | rw | |||
| Bits 31:24 | ALPHA[7:0] | : Alpha value | |||||||||||||
| Bit 22 | APOS | : Alpha position | |||||||||||||
| Bit 21 | RBS : Red/Blue swap | ||||||||||||||
| RM0517 Rev 1 | 809/ | 3945 |
Bits 31:24 ALPHA[7:0]: Alpha value
These bits define a fixed alpha channel value which can replace the original alpha value, or be multiplied by the original alpha value, according to the alpha mode selected through AM[1:0] in this register.
Bit 23 Reserved, must be kept at reset value.
Bit 22 APOS: Alpha position
This bit allows to change the position of the Alpha channel.
0: Regular mode: xRGB or ARGB (default after reset)
1: Swap mode: RGBx or RGBA
Bit 21 RBS: Red/Blue swap
This bit allows to swap Red and Blue to support BGR or ABGR color formats.
0: Regular mode (RGB or ARGB)
1: Swap mode (BGR or ABGR)
Bit 20 AI: Alpha inverted
This bit inverts the alpha value.
0: Regular alpha
1: Inverted alpha
Bits 19:18 CSS[1:0]: Chroma sub-sampling
These bits define the chroma sub-sampling mode for JPEG color mode.
00: 4:4:4 (no chroma sub-sampling)
01: 4:2:2
10: 4:2:0
11: Reserved
Bits 17:16 AM[1:0]: Alpha mode
These bits select the alpha channel value to be used for the layer image.
00: No modification of the layer image alpha channel value
01: Replace original layer image alpha channel value by ALPHA[7: 0]
10: Replace original layer image alpha channel value by ALPHA[7:0] multiplied with original alpha channel value
11: Reserved
Bits 15:8 CS[7:0]: CLUT size
These bits define the size of the CLUT used for the layer image.
The number of CLUT entries is equal to CS[7:0] + 1.
Bits 7:6 Reserved, must be kept at reset value.
Bit 5 START: Start
This bit can be set to start the automatic loading of the CLUT. It is automatically reset:
- • At the end of the transfer
- • When the transfer is aborted by the user by setting ABORT in DMA2D_CR
- • When a transfer error occurs
- • When the transfer has not started due to a configuration error or another transfer operation already ongoing (data transfer or automatic background CLUT transfer)
0: No automatic CLUT loading on going
1: Automatic CLUT loading on going
Bit 4 Reserved, must be kept at reset value.
Bits 3:0 CM[3:0]: Color mode
These bits define the color format of the layer image.
They also define the color format of the CLUT for automatic CLUT loading.
- 0000: ARGB8888
- 0001: RGB888
- 0010: RGB565
- 0011: ARGB1555
- 0100: ARGB4444
- 0101: L8
- 0110: AL44
- 0111: AL88
- 1000: L4
- 1001: A8
- 1010: A4
- 1011: JPEG
- 1100: A2
- 1101: A1
- 1110: ARGB2222
- 1111: Reserved
17.5.9 DMA2D foreground color register (DMA2D_FGCOLR)
Address offset: 0x054
Reset value: 0x0000 0000
This register can only be written when data transfers or the command list execution are disabled. Once the data transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | RED[7:0] | |||||||
| rw | rw | rw | rw | rw | rw | rw | rw | ||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| GREEN[7:0] | BLUE[7:0] | ||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:24 Reserved, must be kept at reset value.
Bits 23:16 RED[7:0]: Red value for the A1, A2, A4 or A8 mode of the layer image
Used also for fixed color in memory-to-memory mode with blending and fixed color layer.
Bits 15:8 GREEN[7:0]: Green value for the A1, A2, A4 or A8 mode of the foreground image
Used also for fixed color in memory-to-memory mode with blending and fixed color layer.
Bits 7:0 BLUE[7:0]: Blue value for the A1, A2, A4 or A8 mode of the foreground image
Used also for fixed color in memory-to-memory mode with blending and fixed color layer.

17.5.10 DMA2D foreground CLUT memory address register (DMA2D_FGCMAR)
Address offset: 0x058
Reset value: 0x0000 0000
This register can only be written when data transfers or the command list execution are disabled. Once the data transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| MA[31:16] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| MA[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:0 MA[31:0]: Memory address
Address of the data used for the CLUT address dedicated to the layer image.
The address alignment must match the image format selected: a 32-bit per pixel format must be 32-bit aligned, a 16-bit per pixel format must be 16-bit aligned, and all other pixel format must be 8-bit aligned.
17.5.11 DMA2D background memory address register (DMA2D_BGMAR)
Address offset: 0x080
Reset value: 0x0000 0000
This register can only be written when data transfers or the command list execution are disabled. Once the data transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| MA[31:16] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| MA[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:0 MA[31:0]: Memory address
Address of the data used for the layer image.
The address alignment must match the image format selected: a 32-bit per pixel format must be 32-bit aligned, a 16-bit per pixel format must be 16-bit aligned, and all other pixel format must be 8-bit aligned.
In JPEG mode, the address must be aligned with a MCU.
17.5.12 DMA2D background offset register (DMA2D_BGOR)
Address offset: 0x084
Reset value: 0x0000 0000
This register can only be written when data transfers or the command list execution are disabled. Once the data transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| LO[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:16 Reserved, must be kept at reset value.
Bits 15:0 LO[15:0]: Line offset
This field gives the line offset used for the background layer image, expressed:
- • In pixels when LOM = 0 in DMA2D_CR. Only LO[13:0] bits are considered, LO[15:14] bits are ignored.
- • In bytes when LOM = 1
This value is used for the address generation. It is added at the end of each line to determine the starting address of the next line.
When the line offset is expressed in pixel, it must be multiple of 2 If the image format is 4-bit per pixel, multiple of 4 if the image format is 2-bit per pixel and multiple of 8 if the image format is 1-bit per pixel.
17.5.13 DMA2D background memory skip register (DMA2D_BGMSR)
Address offset: 0x08C
Reset value: 0x0000 0000
This register can only be written when data transfers or the command list execution are disabled. Once the data transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | VTRAIL[3:0] | Res. | Res. | Res. | Res. | VPRE[3:0] | ||||||
| rw | rw | rw | rw | rw | rw | rw | rw | ||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | HTRAIL[3:0] | Res. | Res. | Res. | Res. | HPRE[3:0] | ||||||
| rw | rw | rw | rw | rw | rw | rw | rw | ||||||||
Bits 31:28 Reserved, must be kept at reset value.
Bits 27:24 VTRAIL[3:0]: Vertical trailing lines
In JPEG mode, this field specifies the number of lines fetched but skipped internally at the end of a surface.
Bits 23:20 Reserved, must be kept at reset value.
Bits 19:16 VPRE[3:0]: Vertical pre lines
In JPEG mode, this field specifies the number of lines fetched but skipped internally at the beginning of a surface.
Bits 15:12 Reserved, must be kept at reset value.
Bits 11:8 HTRAIL[3:0]: Horizontal trailing pixels
In JPEG mode, or in A1, A2, A4 or L4 mode, this field specifies the number of pixel fetched but skipped internally at the end of a line.
Bits 7:4 Reserved, must be kept at reset value.
Bits 3:0 HPRE[3:0]: Horizontal pre pixels
In JPEG mode, or in A1, A2, A4 or L4 mode, this field specifies the number of pixel fetched but skipped internally at the beginning of a line during.
17.5.14 DMA2D background PFC control register (DMA2D_BGPFCCR)
Address offset: 0x090
Reset value: 0x0000 0000
This register can only be written when data transfers or the command list execution are disabled. Once the data transfer or the command list execution started, this register is read-only.
| column_1 | column_2 | Bits 19:16 Bits 11:8 Bits 3:0 only. | VPRE[3:0] HPRE[3:0] | HTRAIL[3:0] | : Vertical pre lines | column_7 | column_8 | column_9 | column_10 | column_11 | column_12 | column_13 | column_14 | column_15 | RM0517 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| ALPHA[7:0] | Res. | APOS | RBS | AI | CSS[1:0] | AM[1:0] | |||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| CS[7:0] | Res. | Res. | START | Res. | CM[3:0] | ||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rs | rw | rw | rw | rw | |||
| Bits 31:24 | ALPHA[7:0] | : Alpha value | |||||||||||||
| Bit 22 | APOS | : Alpha position | |||||||||||||
| Bit 21 | RBS : Red/Blue swap | ||||||||||||||
| Bit 20 | AI : Alpha inverted |
Bits 31:24 ALPHA[7:0]: Alpha value
These bits define a fixed alpha channel value which can replace the original alpha value, or be multiplied by the original alpha value, according to the alpha mode selected through AM[1:0] in this register.
Bit 23 Reserved, must be kept at reset value.
Bit 22 APOS: Alpha position
This bit allows to change the position of the Alpha channel.
0: Regular mode: xRGB or ARGB (default after reset)
1: Swap mode: RGBx or RGBA
Bit 21 RBS: Red/Blue swap
This bit allows to swap Red and Blue to support BGR or ABGR color formats.
0: Regular mode (RGB or ARGB)
1: Swap mode (BGR or ABGR)
Bit 20 AI: Alpha inverted
This bit inverts the alpha value.
0: Regular alpha
1: Inverted alpha
Bits 19:18 CSS[1:0]: Chroma sub-sampling
These bits define the chroma subsampling mode for JPEG color mode.
00: 4:4:4 (no chroma subsampling)
01: 4:2:2
10: 4:2:0
11: Reserved
Bits 17:16 AM[1:0]: Alpha mode
These bits select the alpha channel value to be used for the layer image.
00: No modification of the layer image alpha channel value
01: Replace original layer image alpha channel value by ALPHA[7: 0]
10: Replace original layer image alpha channel value by ALPHA[7:0] multiplied with original alpha channel value
11: Reserved
Bits 15:8 CS[7:0]: CLUT size
These bits define the size of the CLUT used for the layer image.
The number of CLUT entries is equal to CS[7:0] + 1.
Bits 7:6 Reserved, must be kept at reset value.
Bit 5 START: Start
This bit can be set to start the automatic loading of the CLUT. It is automatically reset:
- • At the end of the transfer
- • When the transfer is aborted by the user by setting ABORT in DMA2D_CR
- • When a transfer error occurs
- • When the transfer has not started due to a configuration error or another transfer operation already ongoing (data transfer or automatic background CLUT transfer)
0: No automatic CLUT loading ongoing
1: Automatic CLUT loading ongoing
Bit 4 Reserved, must be kept at reset value.
Bits 3:0 CM[3:0]: Color mode
These bits define the color format of the layer image.
They also define the color format of the CLUT for automatic CLUT loading.
0000: ARGB8888
0001: RGB888
0010: RGB565
0011: ARGB1555
0100: ARGB4444
0101: L8
0110: AL44
0111: AL88
1000: L4
1001: A8
1010: A4
1011: JPEG
1100: A2
1101: A1
1110: ARGB2222
1111: Reserved
17.5.15 DMA2D background color register (DMA2D_BGCOLR)
Address offset: 0x094
Reset value: 0x0000 0000
This register can only be written when data transfers or the command list execution are disabled. Once the data transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | RED[7:0] | |||||||
| rw | rw | rw | rw | rw | rw | rw | rw | ||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| GREEN[7:0] | BLUE[7:0] | ||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:24 Reserved, must be kept at reset value.
Bits 23:16 RED[7:0]: Red value for the A1, A2, A4 or A8 mode of the layer image
Used also for fixed color in memory-to-memory mode with blending and fixed color layer.
Bits 15:8 GREEN[7:0]: Green value for the A1, A2, A4 or A8 mode of the foreground image
Used also for fixed color in memory-to-memory mode with blending and fixed color layer.
Bits 7:0 BLUE[7:0]: Blue value for the A1, A2, A4 or A8 mode of the foreground image
Used also for fixed color in memory-to-memory mode with blending and fixed color layer.
17.5.16 DMA2D background CLUT memory address register (DMA2D_BGCMAR)
Address offset: 0x098
Reset value: 0x0000 0000
This register can only be written when data transfers or the command list execution are disabled. Once the data transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MA[31:16] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| MA[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:0 MA[31:0]: Memory address
Address of the data used for the CLUT address dedicated to the layer image.
The address alignment must match the image format selected: a 32-bit per pixel format must be 32-bit aligned, a 16-bit per pixel format must be 16-bit aligned, and all other pixel format must be 8-bit aligned.
17.5.17 DMA2D output PFC control register (DMA2D_OPFCCR)
Address offset: 0x0C0
Reset value: 0x0000 0000
This register can only be written when transfers or the command list execution are disabled. Once the CLUT transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | APOS | RBS | AI | Res. | Res. | Res. | Res. |
| rw | rw | rw | |||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | SB | Res. | Res. | Res. | Res. | CM[3:0] | |||
| rw | rw | rw | rw | rw | |||||||||||
Bits 31:23 Reserved, must be kept at reset value.
Bit 22 APOS: Alpha position
This bit allows to change the position of the Alpha channel.
0: Regular mode: xRGB or ARGB (default after reset)
1: Swap mode: RGBx or RGBA
Bit 21 RBS: Red/Blue swap
This bit allows to swap Red and Blue to support BGR or ABGR color formats.
0: Regular mode (RGB or ARGB)
1: Swap mode (BGR or ABGR)
Bit 20 AI: Alpha Inverted
This bit inverts the alpha value.
0: Regular alpha
1: Inverted alpha
Bits 19:9 Reserved, must be kept at reset value.
Bit 8 SB: Swap bytes
When this bit is set, the bytes in the output FIFO are swapped two by two. The number of pixels per line (PL) must be even, the output memory address (OMAR) must be even and the tile buffer must not be used.
0: Bytes in regular order in the output FIFO
1: Bytes swapped two by two in the output FIFO
Bits 7:4 Reserved, must be kept at reset value.
Bits 3:0 CM[3:0]: Color mode
These bits define the color format of the output image.
0000: ARGB8888
0001: RGB888
0010: RGB565
0011: ARGB1555
0100: ARGB4444
0101: Reserved
0110: Reserved
0111: Reserved
1000: Reserved
1001: Reserved
1010: Reserved
1011: Reserved
1100: Reserved
1101: Reserved
1110: ARGB2222
1111: Reserved
17.5.18 DMA2D output color register (DMA2D_OCOLR)
Address offset: 0x0C4
Reset value: 0x0000 0000
The same register is used to show the color values, with different formats depending on the color mode.
This register can only be written when transfers or the command list execution are disabled. Once a transfer or the command list execution started, this register is read-only.
| column_1 | column_2 | Bits 3:0 | CM[3:0] color mode. | 0000: ARGB8888 0001: RGB888 0010: RGB565 0011: ARGB1555 0100: ARGB4444 0101: Reserved 0110: Reserved 0111: Reserved 1000: Reserved 1001: Reserved 1010: Reserved 1011: Reserved 1100: Reserved 1101: Reserved 1110: ARGB2222 1111: Reserved | : Color mode | column_7 | column_8 | column_9 | column_10 | column_11 | column_12 | column_13 | column_14 | column_15 | RM0517 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 31 | 30 | 29 | 28 | 27 ALPHA[7:0] | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 RED[7:0] | 18 | 17 | 16 |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| GREEN[7:0] GREEN[7:0] | BLUE[7:0] BLUE[7:0] | ||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
| Bits 31:24 | ALPHA[7:0] | : Alpha channel value of the output color in ARGB8888 mode (otherwise reserved) | |||||||||||||
| Bits 23:16 | RED[7:0] | : Red value of the output image in ARGB8888 or RGB888 mode | |||||||||||||
| Bits 15:8 | GREEN[7:0] | : Green value of the output image in ARGB8888 or RGB888 | |||||||||||||
| Bits 7:0 | BLUE[7:0] | : Blue value of the output image in ARGB8888 or RGB888 |
Bits 31:24 ALPHA[7:0]: Alpha channel value of the output color in ARGB8888 mode (otherwise reserved)
Bits 23:16 RED[7:0]: Red value of the output image in ARGB8888 or RGB888 mode
Bits 15:8 GREEN[7:0]: Green value of the output image in ARGB8888 or RGB888
Bits 7:0 BLUE[7:0]: Blue value of the output image in ARGB8888 or RGB888

17.5.19 DMA2D output memory address register (DMA2D_OMAR)
Address offset: 0x0C8
Reset value: 0x0000 0000
This register can only be written when transfers or the command list execution are disabled. Once the CLUT transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| MA[31:16] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| MA[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:0 MA[31:0]: Memory address
Address of the data used for the output FIFO.
The address alignment must match the image format selected: a 32-bit per pixel format must be 32-bit aligned, a 16-bit per pixel format must be 16-bit aligned, and all other pixel format must be 8-bit aligned.
17.5.20 DMA2D output offset register (DMA2D_OOR)
Address offset: 0x0CC
Reset value: 0x0000 0000
This register can only be written when transfers or the command list execution are disabled. Once the CLUT transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| LO[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:16 Reserved, must be kept at reset value.
Bits 15:0 LO[15:0]: Line offset
This field gives the line offset used for the output, expressed:
- • In pixels when LOM = 0 in DMA2D_CR. Only LO[13:0] bits are considered, LO[15:14] bits are ignored.
- • In bytes when LOM = 1
This value is used for the address generation. It is added at the end of each line to determine the starting address of the next line.
17.5.21 DMA2D number of line register (DMA2D_NLR)
Address offset: 0x0D0
Reset value: 0x0000 0000
This register can only be written when transfers or the command list execution are disabled.
Once the CLUT transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | PL[13:0] | |||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | ||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| NL[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:30 Reserved, must be kept at reset value.
Bits 29:16 PL[13:0]: Pixel per lines
Pixel per lines of the area to be transferred.
Bits 15:0 NL[15:0]: Number of lines
Number of lines of the area to be transferred.
This field is limited to 14-bit when the tile buffer is used with X/Y swapping.
17.5.22 DMA2D line watermark register (DMA2D_LWR)
Address offset: 0x0E0
Reset value: 0x0000 0000
This register can only be written when transfers or the command list execution are disabled.
Once the CLUT transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| LW[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:16 Reserved, must be kept at reset value.
Bits 15:0 LW[15:0]: Line watermark for interrupt generation
An interrupt is raised when the last pixel of the watermarked line has been transferred.
17.5.23 DMA2D AHB master timer configuration register (DMA2D_AMTCR)
Address offset: 0x0F0
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| DT[7:0] | Res. | Res. | Res. | Res. | Res. | Res. | Res. | EN | |||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | |||||||
Bits 31:16 Reserved, must be kept at reset value.
Bits 15:8 DT[7:0]: Dead time
Dead time value in the AHB clock cycle inserted between two consecutive accesses on the AHB master port. These bits represent the minimum guaranteed number of cycles between two consecutive AHB accesses.
Bits 7:1 Reserved, must be kept at reset value.
Bit 0 EN: Dead-time functionality enable
17.5.24 DMA2D stencil buffer configuration register (DMA2D_SBCR)
Address offset: 0x100
Reset value: 0x0000 0000
This register can only be written when data transfers or the command list execution are disabled. Once the data transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | AI | Res. | Res. | Res. | Res. |
| rw | |||||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | MODE[1:0] | Res. | Res. | SRC[1:0] | ||
| rw | rw | rw | rw | ||||||||||||
Bits 31:21 Reserved, must be kept at reset value.
Bit 20 AI: Alpha Inverted
This bit inverts the alpha value.
0: Regular alpha
1: Inverted alpha
Bits 19:6 Reserved, must be kept at reset value.
Bits 5:4 MODE[1:0]: mode
This fields selects the stencil buffer format
00: 1 bpp (default after reset)
01: 2 bpp
10: 4 bpp
11: 8 bpp
Bits 3:2 Reserved, must be kept at reset value.
Bits 1:0 SRC[1:0]: Source
This field selects the source on which shall applies the stencil buffer.
00: No stencil buffer (default after reset)
01: Foreground plane
10: Background plane
11: Blender output
17.5.25 DMA2D stencil buffer memory address register (DMA2D_SBMAR)
Address offset: 0x104
Reset value: 0x0000 0000
This register can only be written when data transfers or the command list execution are disabled. Once the data transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| MA[31:16] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| MA[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:0 MA[31:0]: Memory address, address of the data used for the stencil buffer
17.5.26 DMA2D stencil buffer offset register (DMA2D_SBOR)
Address offset: 0x108
Reset value: 0x0000 0000
This register can only be written when data transfers or the command list execution are disabled. Once the data transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| LO[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:16 Reserved, must be kept at reset value.
Bits 15:0 LO[15:0]: Line offset
This field gives the line offset used for the stencil buffer, expressed:
- • In pixels when LOM = 0 in DMA2D_CR. Only LO[13:0] bits are considered, LO[15:14] bits are ignored.
- • In bytes when LOM = 1
This value is used for the address generation. It is added at the end of each line to determine the starting address of the next line.
When the line offset is expressed in pixel, it must be mutiple of 2 If the image format is 4-bit per pixel, multiple of 4 if the image format is 2-bit per pixel and multiple of 8 if the image format is 1-bit per pixel.
17.5.27 DMA2D stencil buffer memory skip register (DMA2D_SBMSR)
Address offset: 0x110
Reset value: 0x0000 0000
This register can only be written when data transfers or the command list execution are disabled. Once the data transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | HTRAIL[3:0] | Res. | Res. | Res. | Res. | HPRE[3:0] | ||||||
| rw | rw | rw | rw | rw | rw | rw | rw | ||||||||
Bits 31:12 Reserved, must be kept at reset value.
Bits 11:8 HTRAIL[3:0]: Horizontal trailing pixels
In 1/2/4 bpp mode, this field specifies the number of pixel fetched but skipped internally at the end of a line.
Bits 7:4 Reserved, must be kept at reset value.
Bits 3:0 HPRE[3:0]: Horizontal pre pixels
In 1/2/4 bpp mode, this field specifies the number of pixel fetched but skipped internally at the beginning of a line during.

17.5.28 DMA2D tile buffer configuration register (DMA2D_TBCR)
Address offset: 0x140
Reset value: 0x0000 0000
This register can only be written when data transfers or the command list execution are disabled. Once the data transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | XYSEN | YMEN | XMEN | Res. | Res. | SRC[1:0] | |
| rw | rw | rw | rw | rw | |||||||||||
Bits 31:7 Reserved, must be kept at reset value.
- Bit 6 XYSEN: X/Y swap enable
- This bit swap X and Y when pixel are read out from the tile buffer
- 0: X/Y not swapped (default after reset)
- 1: X/Y swapped
- Bit 5 YMEN: Y mirroring enable
- This bit enables the Y mirroring when pixel are read out from the tile buffer
- 0: Y not mirrored (default after reset)
- 1: Y mirrored
- Bit 4 XMEN: X mirroring enable
- This bit enables the X mirroring when pixel are read out from the tile buffer
- 0: X not mirrored (default after reset)
- 1: X mirrored
Bits 3:2 Reserved, must be kept at reset value.
- Bits 1:0 SRC[1:0]: Source
- This field selects the source of the tile buffer.
- 00: No tile buffer (default after reset)
- 01: Foreground plane
- 10: Background plane
- 11: Blender output

17.5.29 DMA2D scaler configuration register (DMA2D_SCR)
Address offset: 0x180
Reset value: 0x0000 0000
This register can only be written when data transfers or the command list execution are disabled. Once the data transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | SRC[1:0] | |
| rw | rw | ||||||||||||||
Bits 31:2 Reserved, must be kept at reset value.
Bits 1:0 SRC[1:0]: Source
- This field selects the source of the scaler
- 00: Scaler is disabled (default after reset)
- 01: Foreground plane
- 10: Background plane
- 11: Blender output
17.5.30 DMA2D scaler number of line register (DMA2D_SNLR)
Address offset: 0x184
Reset value: 0x0000 0000
This register can only be written when transfers or the command list execution are disabled. Once the data transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | PL[13:0] | |||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | ||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| NL[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:30 Reserved, must be kept at reset value.
Bits 29:16 PL[13:0]: Pixel per lines
Pixel per lines of the area to be scaled.
Bits 15:0 NL[15:0]: Number of lines
Number of lines of the area to be scaled.
17.5.31 DMA2D scaler step register (DMA2D_SSR)
Address offset: 0x188
Reset value: 0x0000 0000
This register can only be written when transfers or the command list execution are disabled.
Once the data transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | VSTEP[11:0] | |||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | ||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | HSTEP[11:0] | |||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | ||||
Bits 31:28 Reserved, must be kept at reset value.
Bits 27:16 VSTEP[11:0]: vertical step
This field is the fractional vertical step minus one to be used by the scaler.
Bits 15:12 Reserved, must be kept at reset value.
Bits 11:0 HSTEP[11:0]: horizontal step
This field is the fractional horizontal step minus one to be used by the scaler.
17.5.32 DMA2D scaler phase register (DMA2D_SPR)
Address offset: 0x18C
Reset value: 0x0000 0000
This register can only be written when transfers or the command list execution are disabled.
Once the data transfer or the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | VPHASE[11:0] | |||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | ||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | HPHASE[11:0] | |||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | ||||
Bits 31:28 Reserved, must be kept at reset value.
Bits 27:16 VPHASE[11:0]: vertical phase
This field is the fractional vertical phase to be used by the scaler.
Bits 15:12 Reserved, must be kept at reset value.
Bits 11:0 HPHASE[11:0]: horizontal phase
This field is the fractional horizontal phase to be used by the scaler.
17.5.33 DMA2D general purpose flag configuration register (DMA2D_GPFCR)
Address offset: 0x200
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | GPF3 SC | GPF2 SC | GPF1 SC | GPF0 SC |
| rw | rw | rw | rw | ||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | GPF3IC[1:0] | GPF2IC[1:0] | GPF1IC[1:0] | GPF0IC[1:0] | ||||
| rw | rw | rw | rw | rw | rw | rw | rw | ||||||||
Bits 31:20 Reserved, must be kept at reset value.
Bit 19 GPF3SC: General purpose flag 3 suspend configuration
This bit specifies if the general purpose flag 3 can suspend the execution of a command list.
0: No effect
1: The command list execution is suspended when GPF3 is set
Bit 18 GPF2SC: General purpose flag 2 suspend configuration
This bit specifies if the general purpose flag 2 can suspend the execution of a command list.
0: No effect
1: The command list execution is suspended when GPF2 is set
Bit 17 GPF1SC: General purpose flag 1 suspend configuration
This bit specifies if the general purpose flag 1 can suspend the execution of a command list.
0: No effect
1: The command list execution is suspended when GPF1 is set
Bit 16 GPF0SC: General purpose flag 0 suspend configuration
This bit specifies if the general purpose flag 0 can suspend the execution of a command list.
0: No effect
1: The command list execution is suspended when GPF0 is set
Bits 15:8 Reserved, must be kept at reset value.
Bits 7:6 GPF3IC[1:0]: General purpose flag 3 interrupt configuration
This field specifies the behavior of the general purpose interrupt flag 3 (in the DMA2D_ISR) versus the event on the general purpose flag 3.
00: GPIF3 is never set
01: GPIF3 is set on a rising edge of the GPF3
10: GPIF3 is set on a falling edge of the GPF3
11: GPIF3 is set on a rising or a falling edge of the GPF3
Bits 5:4 GPF2IC[1:0]: General purpose flag 2 interrupt configuration
This field specifies the behavior of the general purpose interrupt flag 2 (in the DMA2D_ISR) versus the event on the general purpose flag 2.
00: GPIF2 is never set
01: GPIF2 is set on a rising edge of the GPF2
10: GPIF2 is set on a falling edge of the GPF2
11: GPIF2 is set on a rising or a falling edge of the GPF2
Bits 3:2 GPF1IC[1:0]: General purpose flag 1 interrupt configuration
This field specifies the behavior of the general purpose interrupt flag 1 (in the DMA2D_ISR) versus the event on the general purpose flag 1.
00: GPIF1 is never set
01: GPIF1 is set on a rising edge of the GPF1
10: GPIF1 is set on a falling edge of the GPF1
11: GPIF1 is set on a rising or a falling edge of the GPF1
Bits 1:0 GPF0IC[1:0]: General purpose flag 0 interrupt configuration
This field specifies the behavior of the general purpose interrupt flag 0 (in the DMA2D_ISR) versus the event on the general purpose flag 0.
00: GPIF0 is never set
01: GPIF0 is set on a rising edge of the GPF0
10: GPIF0 is set on a falling edge of the GPF0
11: GPIF0 is set on a rising or a falling edge of the GPF0
17.5.34 DMA2D general purpose flag register (DMA2D_GPFR)
Address offset: 0x204
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | GPF3 | GPF2 | GPF1 | GPF0 |
| r | r | r | r |
Bits 31:4 Reserved, must be kept at reset value.
Bit 3 GPF3: General purpose flag 3
This bit gives the value of the general purpose flag 3
0: GPF3 is reset
1: GPF3 is set
Bit 2 GPF2: General purpose flag 2
This bit gives the value of the general purpose flag 2
0: GPF2 is reset
1: GPF2 is set
Bit 1 GPF1: General purpose flag 1
This bit gives the value of the general purpose flag 1
0: GPF1 is reset
1: GPF1 is set
Bit 0 GPF0: General purpose flag 0
This bit gives the value of the general purpose flag 0
0: GPF0 is reset
1: GPF0 is set
17.5.35 DMA2D general purpose flag set register (DMA2D_GPFSR)
Address offset: 0x208
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | SGPF3 | SGPF2 | SGPF1 | SGPF0 |
| w | w | w | w |
Bits 31:4 Reserved, must be kept at reset value.
Bit 3 SGPF3: Set general purpose flag 3
This bit set the general purpose flag 3
0: No effect
1: Set GPF3
Bit 2 SGPF2: Set general purpose flag 2
This bit set the general purpose flag 2
0: No effect
1: Set GPF2
Bit 1 SGPF1: Set general purpose flag 1
This bit set the general purpose flag 1
0: No effect
1: Set GPF1
Bit 0 SGPF0: Set general purpose flag 0
This bit set the general purpose flag 0
0: No effect
1: Set GPF0
17.5.36 DMA2D general purpose flag reset register (DMA2D_GPFRR)
Address offset: 0x20C
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | RGPF3 | RGPF2 | RGPF1 | RGPF0 |
| w | w | w | w |
Bits 31:4 Reserved, must be kept at reset value.
Bit 3 RGPF3: Reset general purpose flag 3
This bit reset the general purpose flag 3
0: No effect
1: Reset GPF3
- Bit 2 RGPF2: Reset general purpose flag 2
This bit reset the general purpose flag 2
0: No effect
1: Reset GPF2 - Bit 1 RGPF1: Reset general purpose flag 1
This bit reset the general purpose flag 1
0: No effect
1: Reset GPF1 - Bit 0 RGPF0: Reset general purpose flag 0
This bit reset the general purpose flag 0
0: No effect
1: Reset GPF0
17.5.37 DMA2D command list configuration register (DMA2D_CLCR)
Address offset: 0x240
Reset value: 0x0000 0000
This register can only be written when the command list execution is disabled. Once the the command list execution started, this register is read-only.
| column_1 | column_2 | Bit 2 Bit 1 Bit 0 | RGPF2 RGPF1 RGPF0 | 0: No effect 1: Reset GPF2 0: No effect 1: Reset GPF1 0: No effect 1: Reset GPF0 | column_6 | column_7 | column_8 | column_9 | column_10 | column_11 | column_12 | column_13 | column_14 | column_15 | RM0517 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | RBS[2:0] | Res. | ABORT SUSP START | ||||
| rw | rw | rw | rs | rw | rs | ||||||||||
| Bits 6:4 | RBS[2:0] | : Ring buffer size | |||||||||||||
| Bit 2 | ABORT | : Abort |
- Bits 31:7 Reserved, must be kept at reset value.
- Bits 6:4 RBS[2:0]: Ring buffer size
This field defines the size of the ring buffer for the command list. The ring buffer size is equal to \(2^{\text{RBS}+6}\). The minimum size is 64 bytes (2⁶) and the maximum size is 8KBytes (2¹³)
This field can be read by software anytime and can be written by software only when the command list is not active (START = 0 in the DMA2D_CLCR) - Bit 3 Reserved, must be kept at reset value.
- Bit 2 ABORT: Abort
This bit can be used to abort the current command list. The abort is done after the completion of the current command being executed.
This bit is set by software, and is automatically reset by hardware when START = 0 in the DMA2D_CLCR.
0: No command list execution abort requested
1: Command list execution abort requested

Bit 1 SUSP: Suspend
This bit can be used to suspend the current command list. The suspend is effective after the completion of the current command being executed.
This bit is set by software writing 1, or can be set by hardware when the suspension is caused by a GPFLAG. It can be reset by software when the command list is effectively suspended (at least one suspend bit of the DMA2D_CLSR is set).
It is automatically reset by hardware when START = 0 in the DMA2D_CLCR.
0: No command list execution suspension request
1: Command list execution suspension requested
Bit 0 START: Start
This bit start the execution of the ring buffer. This bit is set by software and is automatically reset by hardware when by the following events:
- • At the end of the ring buffer execution
- • When a command list execution is aborted by the user by setting the ABORT in the DMA2D_CLCR
- • When a command list error occurs
- • When a data transfer is aborted by the user by setting the ABORT in the DMA2D_CR
- • When a data transfer error occurs
- • When the data transfer has not started due to a configuration error
0: No ring buffer execution on going
1: Ring buffer execution on going
17.5.38 DMA2D command list status register (DMA2D_CLSR)
Address offset: 0x244
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | LCLMSE | LCLIE | LCLRE | Res. | Res. | Res. | GPF3S | GPF2S | GPF1S | GPF0S | SUSPS |
| r | r | r | r | r | r | r | r |
Bits 31:11 Reserved, must be kept at reset value.
Bit 10 LCLMSE: Linear command list multiple start error
This bit indicates that multiple start bit have been set in the same instruction of the command list.
This bit is set in conjunction with the Command list error interrupt flag (CLEIF) of the DMA2D_ISR.
This field is set by hardware and reset by software clearing the CLEIF in the DMA2D_IFCR.
0: No error
1: Linear command list multi start error occurred
- Bit 9 LCLIE: Linear command list instruction error
This bit indicates that the END instruction of a linear command list didn't match with the linear command list size (missing or occurred before the end of the linear command list) or an illegal instruction is detected.
This bit is set in conjunction with the Command list error interrupt flag (CLEIF) of the DMA2D_ISR.
This field is set by hardware and reset by software clearing the CLEIF in the DMA2D_IFCR.
0: No error
1: Linear command list end mismatch/illegal instruction error occurred - Bit 8 LCLRE: Linear command list read error
This bit indicates that an error occurred during a linear command list read, or a configuration error has been generated during the execution, or an abort of the current DMA2D operation has been done.
This bit is set in conjunction with the command list error interrupt flag (CLEIF) of the DMA2D_ISR.
This field is set by hardware and reset by software clearing the CLEIF in the DMA2D_IFCR.
0: No error
1: Linear command list read error occurred - Bits 7:5 Reserved, must be kept at reset value.
- Bit 4 GPF3S: General purpose flag 3 suspend
This field indicates if the linear command list is currently suspended by a general purpose flag 3. This flag is set by hardware when the suspension is effective and is reset by hardware once the suspending general purpose flag 3 is reset.
0: The command list is not suspended
1: The command list is suspended by general purpose flag 3 - Bit 3 GPF2S: General purpose flag 2 suspend
This field indicates if the linear command list is currently suspended by a general purpose flag 2. This flag is set by hardware when the suspension is effective and is reset by hardware once the suspending general purpose flag 2 is reset.
0: The command list is not suspended
1: The command list is suspended by general purpose flag 2 - Bit 2 GPF1S: General purpose flag 1 suspend
This field indicates if the linear command list is currently suspended by a general purpose flag 1. This flag is set by hardware when the suspension is effective and is reset by hardware once the suspending general purpose flag 1 is reset.
0: The command list is not suspended
1: The command list is suspended by general purpose flag 1 - Bit 1 GPF0S: General purpose flag 0 suspend
This field indicates if the linear command list is currently suspended by a general purpose flag 0. This flag is set by hardware when the suspension is effective and is reset by hardware once the suspending general purpose flag 0 is reset.
0: The command list is not suspended
1: The command list is suspended by general purpose flag 0 - Bit 0 SUSPS: SUSP bit suspend
This field indicates if the linear command list is currently suspended by the SUSP bit. This flag is set by hardware when the suspension is effective and is reset by hardware once the suspending SUSP bit is reset.
0: The command list is not suspended
1: The command list is suspended by the SUSP bit
17.5.39 DMA2D ring buffer base address register (DMA2D_RBBAR)
Address offset: 0x250
Reset value: 0x0000 0000
This register can only be written when the command list execution is disabled. Once the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| ADDRESS[31:16] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| ADDRESS[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:0 ADDRESS[31:0]: Address
This field defines the base address of the ring buffer.
The address must be 64-bit aligned (bit 0, 1 and 2 ignored).
It can be read by software anytime and can be written by software only when the DMA2D is not active (START = 0 in the DMA2D_CLCR)
The address is double-word aligned.
17.5.40 DMA2D ring buffer head pointer register (DMA2D_RBHPR)
Address offset: 0x254
Reset value: 0x0000 0000
This register can only be written when the command list execution is disabled. Once the command list execution started, this register is read-only.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | HP[13:0] | ||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | ||
Bits 31:14 Reserved, must be kept at reset value.
Bits 13:0 HP[13:0]: Head Pointer
This field is the head in the ring buffer.
The pointer must be 64-bit aligned (bit 0, 1 and 2 ignored).
It can be read and is updated at each command fetch to point to the next command to be fetch.
It can be read by software anytime and can be written by software only when the DMA2D is not active (START = 0 in the DMA2D_CLCR)
When this pointer is equal to the write pointer, the DMA2D is automatically stopped.
17.5.41 DMA2D ring buffer write pointer register (DMA2D_RBWPR)
Address offset: 0x258
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | WP[13:0] | |||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | ||
Bits 31:14 Reserved, must be kept at reset value.
Bits 13:0 WP[13:0]: Write Pointer
This field defines the write pointer on the ring buffer.
The pointer must be 64-bit aligned (bit 0, 1 and 2 ignored).
It can be written by software only and must point to the first free slot of the command list.
17.5.42 DMA2D linear buffer current base address register (DMA2D_LBCBAR)
Address offset: 0x260
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| ADDRESS[31:16] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| ADDRESS[15:0] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
Bits 31:0 ADDRESS[31:0]: Address
This field defines the base address of the linear buffer being currently executed.
It can only be read by software.
17.5.43 DMA2D linear buffer current size register (DMA2D_LBCSR)
Address offset: 0x264
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | SIZE[11:0] | |||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | ||||
Bits 31:12 Reserved, must be kept at reset value.
Bits 11:0 SIZE[11:0]: Size This field gives the size in word of the linear buffer being currently executed. It can only be read by software.
17.5.44 DMA2D linear buffer current address register (DMA2D_LBCAR)
Address offset: 0x268 Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| ADDRESS[31:16] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| ADDRESS[15:0] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
Bits 31:0 ADDRESS[31:0]: Address This field gives the address in the linear buffer of the instruction being currently executed. It can only be read by software.
17.5.45 DMA2D foreground CLUTx (DMA2D_FGCLUTx)
Address offset: 0x400 + 0x4 * x, (x = 0 to 255) Reset value: 0XXXXX XXXX
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| ALPHA[7:0] | RED[7:0] | ||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| GREEN[7:0] | BLUE[7:0] | ||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:24 ALPHA[7:0]: Alpha Alpha value for index {x} for the foreground Bits 23:16 RED[7:0]: Red Red value for index {x} for the foreground Bits 15:8 GREEN[7:0]: Green Green value for index {x} for the foreground Bits 7:0 BLUE[7:0]: Blue Blue value for index {x} for the foreground

17.5.46 DMA2D background CLUTx (DMA2D_BGCLUTx)
Address offset: 0x800 + 0x4 * x, (x = 0 to 255)
Reset value: 0xXXXX XXXX
| column_1 | column_2 | column_3 | column_4 | column_5 | column_6 | column_7 | column_8 | column_9 | column_10 | column_11 | column_12 | column_13 | column_14 | column_15 | RM0517 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 31 | 30 | 29 | 28 | 27 ALPHA[7:0] | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 RED[7:0] | 18 | 17 | 16 |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| GREEN[7:0] GREEN[7:0] | BLUE[7:0] BLUE[7:0] | ||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
| Bits 31:24 | ALPHA[7:0] | : Alpha | |||||||||||||
| Bits 23:16 | RED[7:0] | : Red | |||||||||||||
| Bits 15:8 | GREEN[7:0] | : Green | |||||||||||||
| Bits 7:0 | BLUE[7:0] | : Blue |
Bits 31:24 ALPHA[7:0]: Alpha
Alpha value for index {x} for the background
Bits 23:16 RED[7:0]: Red
Red value for index {x} for the background
Bits 15:8 GREEN[7:0]: Green
Green value for index {x} for the background
Bits 7:0 BLUE[7:0]: Blue
Blue value for index {x} for the background

17.5.47 DMA2D register map
Table 160. DMA2D register map and reset values
| Offset | Register name reset value | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0x000 | DMA2D_CR | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | MODE [2:0] | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | LOM | Res. | Res. | Res. | Res. | ABORT | SUSP | START | |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||
| 0x004 - 0x00C | Reserved | Res. | ||||||||||||||||||||||||||||||||
| 0x010 | DMA2D_ISR | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | GPF3IF | GPF2IF | GPF1IF | GPF0IF | Res. | Res. | CLEIF | CLSIF | Res. | Res. | RBEIF | RBCIF | Res. | Res. | CEIF | CTCIF | CAEIF | TWIF | TCIF | TEIF |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||
| 0x014 | DMA2D_IER | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | GPF3IE | GPF2IE | GPF1IE | GPF0IE | Res. | Res. | CLEIE | CLSIE | Res. | Res. | RBEIE | RBCIE | Res. | Res. | CEIE | CTCIE | CAEIE | TWIE | TCIE | TEIE |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||
| 0x018 | DMA2D_IFCR | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | CGPF3IF | CGPF2IF | CGPF1IF | CGPF0IF | Res. | Res. | CCLIF | CCLSIF | Res. | Res. | CRBEIF | CRBCIF | Res. | Res. | CCEIF | CCTCIF | CAECIF | CTWIF | CTCIF | CTEIF |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||
| 0x01C - 0x03C | Reserved | Res. | ||||||||||||||||||||||||||||||||
| 0x040 | DMA2D_FGMAR | MA[31:0] | ||||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||
| 0x044 | DMA2D_FGOR | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | LO[15:0] | ||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||||
| 0x048 | Reserved | Res. | ||||||||||||||||||||||||||||||||
| 0x04C | DMA2D_FGMSR | Res. | Res. | Res. | Res. | VTRAIL[3:0] | Res. | Res. | Res. | Res. | VPRE[3:0] | Res. | Res. | Res. | Res. | HTRAIL[3:0] | Res. | Res. | Res. | Res. | HPRE[3:0] | |||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||||
| 0x050 | DMA2D_FGPFCCR | ALPHA[7:0] | Res. | APOS | RBS | AI | CSS [1:0] | AM [1:0] | CS[7:0] | Res. | Res. | START | Res. | CM[3:0] | ||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||
| 0x054 | DMA2D_FGCOLR | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | RED[7:0] | GREEN[7:0] | BLUE[7:0] | ||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||
| 0x058 | DMA2D_FGCMAR | MA[31:0] | ||||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||
| 0x05C - 0x07C | Reserved | Res. | ||||||||||||||||||||||||||||||||
| 0x080 | DMA2D_BGMAR | MA[31:0] | ||||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||
| 0x084 | DMA2D_BGOR | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | LO[15:0] | |||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||
| 0x088 | Reserved | Res. | ||||||||||||||||||||||||||||||||
| 0x08C | DMA2D_BGMSR | Res. | Res. | Res. | Res. | VTRAIL[3:0] | Res. | Res. | Res. | Res. | VPRE[3:0] | Res. | Res. | Res. | Res. | HTRAIL[3:0] | Res. | Res. | Res. | Res. | HPRE[3:0] | |||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||||
| 0x090 | DMA2D_BGPFCCR | ALPHA[7:0] | Res. | APOS | RBS | AI | CSS [1:0] | AM [1:0] | CS[7:0] | Res. | Res. | START | Res. | CM[3:0] | ||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||
Table 160. DMA2D register map and reset values (continued)
| Offset | Register name reset value | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0x094 | DMA2D_BGCOLR | Res | Res | Res | Res | Res | Res | Res | Res | RED[7:0] | GREEN[7:0] | BLUE[7:0] | |||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||
| 0x098 | DMA2D_BGCMAR | MA[31:0] | |||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 0x09C - 0x0BC | Reserved | Res. | |||||||||||||||||||||||||||||||
| 0x0C0 | DMA2D_OPFCCR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | APOS | RBS | AI | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | SB | Res | Res | Res | Res | Res | CM[3:0] | ||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||
| 0x0C4 | DMA2D_OCOLR | ALPHA[7:0] | RED[7:0] | GREEN[7:0] | BLUE[7:0] | ||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 0x0C8 | DMA2D_OMAR | MA[31:0] | |||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 0x0CC | DMA2D_OOR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | LO[15:0] | ||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||
| 0x0D0 | DMA2D_NLR | Res | Res | PL[13:0] | NL[15:0] | ||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||
| 0x0D4 - 0x0DC | Reserved | Reserved | |||||||||||||||||||||||||||||||
| 0x0E0 | DMA2D_LWR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | LW[15:0] | ||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||
| 0x0E4 - 0x0EC | Reserved | Res. | |||||||||||||||||||||||||||||||
| 0x0F0 | DMA2D_AMTCR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | DT[7:0] | Res | Res | Res | Res | Res | Res | Res | Res | EN | |||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||||||||||
| 0x0F4 - 0x0FC | Reserved | Res. | |||||||||||||||||||||||||||||||
| 0x100 | DMA2D_SBCR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | AI | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | MODE[1:0] | Res | Res | SRC [1:0] | |||
| Reset value | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||||||||||||||
| 0x104 | DMA2D_SBMAR | MA[31:0] | |||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 0x108 | DMA2D_SBOR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | LO[15:0] | ||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||
| 0x10C | Reserved | Res. | |||||||||||||||||||||||||||||||
| 0x110 | DMA2D_SBMSR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | HTRAIL[3:0] | Res | Res | Res | Res | HPRE[3:0] | |||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||
| 0x114 - 0x13C | Reserved | Res. | |||||||||||||||||||||||||||||||
| 0x140 | DMA2D_TBCR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | XYSEN | YMEN | XMEN | Res | SRC [1:0] | |||
| Reset value | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||||||||||||||
| 0x144 - 0x17C | Reserved | Res. | |||||||||||||||||||||||||||||||
| 0x180 | DMA2D_SCR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | SRC [1:0] | |||
| Reset value | 0 | 0 | |||||||||||||||||||||||||||||||

Table 160. DMA2D register map and reset values (continued)
| Offset | Register name reset value | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0x184 | DMA2D_SNLR | Res | Res | PL[13:0] | NL[15:0] | ||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||
| 0x188 | DMA2D_SSR | Res | Res | Res | Res | VSTEP[11:0] | Res | Res | Res | Res | HSTEP[11:0] | ||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||
| 0x18C | DMA2D_SPR | Res | Res | Res | Res | VPHASE[11:0] | Res | Res | Res | Res | HPHASE[11:0] | ||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||
| 0x190 - 0x1FC | Reserved | Res. | |||||||||||||||||||||||||||||||
| 0x200 | DMA2D_GPFCR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||||||||
| 0x204 | DMA2D_GPFR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res |
| Reset value | |||||||||||||||||||||||||||||||||
| 0x208 | DMA2D_GPFSR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res |
| Reset value | |||||||||||||||||||||||||||||||||
| 0x20C | DMA2D_GPFRR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res |
| Reset value | |||||||||||||||||||||||||||||||||
| 0x210 - 0x23C | Reserved | Res. | |||||||||||||||||||||||||||||||
| 0x240 | DMA2D_CLCR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res |
| Reset value | |||||||||||||||||||||||||||||||||
| 0x244 | DMA2D_CLSR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res |
| Reset value | |||||||||||||||||||||||||||||||||
| 0x248 - 0x24C | Reserved | Res. | |||||||||||||||||||||||||||||||
| 0x250 | DMA2D_RBBAR | ADDRESS[31:0] | |||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 0x254 | DMA2D_RBHPR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | HP[13:0] | |||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||
| 0x258 | DMA2D_RBWPR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | WP[13:0] | |||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||
| 0x25C | Reserved | Res. | |||||||||||||||||||||||||||||||
| 0x260 | DMA2D_LBCBAR | ADDRESS[31:0] | |||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 0x264 | DMA2D_LBCSR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | SIZE[11:0] | |||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||
| 0x268 | DMA2D_LBCAR | ADDRESS[31:0] | |||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 0x26C - 0x3FC | Reserved | Res. | |||||||||||||||||||||||||||||||
Table 160. DMA2D register map and reset values (continued)
| Offset | Register name reset value | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0x400 + 0x4*x, (x=0 to 255) | DMA2D_ FGCLUTx | ALPHA[7:0] | RED[7:0] | GREEN[7:0] | BLUE[7:0] | ||||||||||||||||||||||||||||
| Reset value | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | |
| 0x800 + 0x4*x, (x=0 to 255) | DMA2D_ BGCLUTx | ALPHA[7:0] | RED[7:0] | GREEN[7:0] | BLUE[7:0] | ||||||||||||||||||||||||||||
| Reset value | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | |
Refer to Section 2.3: Memory organization for the register boundary addresses.
