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:

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:

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:

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

Figure 91: DMA2D block diagram. The diagram shows the internal architecture of the DMA2D controller. On the left, external interfaces include DMA2D_GPFLAG0-3, a 32-bit AHB bus, dma2d_it, dma2d_tc, dma2d_ctc, dma2d_tw, dma2d_gpflagx, dma2d_gpflagsetx, dma2d_gpflagrstx, dma2d_hclk, and another 32-bit AHB bus. The internal logic is divided into several functional blocks: AHB Master, Command List, Control, General Purpose Flags, and AHB Register Interface. The core processing is organized into four horizontal layers: Output, Stencil, Foreground, and Background. Each layer contains a FIFO, a Pixel Format Conversion (PFC) block, and a Skip block. The Output layer also includes Rotate and Scale blocks. The Foreground and Background layers include a 256x32 CLUT, Stenciling blocks, and Rotate/JPEG and Scale blocks. A Blend block at the bottom right combines the outputs from the Foreground and Background layers. Data paths are labeled with ARGB and bit widths (e.g., 32, 8).
Figure 91: DMA2D block diagram. The diagram shows the internal architecture of the DMA2D controller. On the left, external interfaces include DMA2D_GPFLAG0-3, a 32-bit AHB bus, dma2d_it, dma2d_tc, dma2d_ctc, dma2d_tw, dma2d_gpflagx, dma2d_gpflagsetx, dma2d_gpflagrstx, dma2d_hclk, and another 32-bit AHB bus. The internal logic is divided into several functional blocks: AHB Master, Command List, Control, General Purpose Flags, and AHB Register Interface. The core processing is organized into four horizontal layers: Output, Stencil, Foreground, and Background. Each layer contains a FIFO, a Pixel Format Conversion (PFC) block, and a Skip block. The Output layer also includes Rotate and Scale blocks. The Foreground and Background layers include a 256x32 CLUT, Stenciling blocks, and Rotate/JPEG and Scale blocks. A Blend block at the bottom right combines the outputs from the Foreground and Background layers. Data paths are labeled with ARGB and bit widths (e.g., 32, 8).

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

NamesSignal typeDescription
DMA2D_GPFLAG0OutputDMA2D general purpose flag 0 output
DMA2D_GPFLAG1OutputDMA2D general purpose flag 1 output
DMA2D_GPFLAG2OutputDMA2D general purpose flag 2 output
DMA2D_GPFLAG3OutputDMA2D general purpose flag 3 output

Table 139. DMA2D internal signals

NamesSignal typeDescription
dma2d_hclkInputDMA2D AHB clock
dma2d_itOutputDMA2D global interrupt request
dma2d_ctcOutputDMA2D CLUT transfer complete trigger
dma2d_tcOutputDMA2D transfer complete trigger
dma2d_twOutputDMA2D transfer watermark trigger
dma2d_gpflag0OutputDMA2D general purpose flag 0
dma2d_gpflag1OutputDMA2D general purpose flag 1
dma2d_gpflag2OutputDMA2D general purpose flag 2
dma2d_gpflag3OutputDMA2D general purpose flag 3
dma2d_gpflagset0InputDMA2D general purpose flag 0 set
dma2d_gpflagset1InputDMA2D general purpose flag 1 set
dma2d_gpflagset2InputDMA2D general purpose flag 2 set
dma2d_gpflagset3InputDMA2D general purpose flag 3 set
dma2d_gpflagrst0InputDMA2D general purpose flag 0 reset
dma2d_gpflagrst1InputDMA2D general purpose flag 1 reset
dma2d_gpflagrst2InputDMA2D general purpose flag 2 reset
dma2d_gpflagrst3InputDMA2D general purpose flag 3 reset

Table 140. DMA2D trigger interconnections

Trigger nameDirectionTrigger source/destination
dma2d_tcOutputgpdma1_trigsel[47]
gpdma2_trigsel[47]
dma2d_ctcOutputgpdma1_trigsel[48]
gpdma2_trigsel[48]
dma2d_twOutputgpdma1_trigsel[49]
gpdma2_trigsel[49]

Table 140. DMA2D trigger interconnections (continued)

Trigger nameDirectionTrigger source/destination
dma2d_gpflag0Outputgpdma1_trigsel[50]
gpdma2_trigsel[50]
dma2d_gpflag1Outputgpdma1_trigsel[51]
gpdma2_trigsel[51]
dma2d_gpflag2Outputgpdma1_trigsel[52]
gpdma2_trigsel[52]
dma2d_gpflag3Outputgpdma1_trigsel[53]
gpdma2_trigsel[53]
Used also for debug
dma2d_gpflagset0InputReserved
dma2d_gpflagset1InputReserved
dma2d_gpflagset2InputReserved
dma2d_gpflagset3InputUsed also for debug
dma2d_gpflagrst0InputReserved
dma2d_gpflagrst1InputReserved
dma2d_gpflagrst2InputReserved
dma2d_gpflagrst3InputUsed 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

Figure 92. DMA2D pipeline diagram showing the data flow from Fetching to Writeback across three layers: Stencil, Foreground (FG), and Background (BG).

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.

MSv74127V1

Figure 92. DMA2D pipeline diagram showing the data flow from Fetching to Writeback across three layers: Stencil, Foreground (FG), and Background (BG).

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:

The operating mode is one of the following

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:

Figure 93. DMA2D image parameters

Diagram of DMA2D image parameters showing the Working Area, PL (pixel), NL (line), and LO (Pixel or byte) dimensions.

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.

Diagram of DMA2D image parameters showing the Working Area, PL (pixel), NL (line), and LO (Pixel or byte) dimensions.

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
ARGB8888A0[7:0]R0[7:0]G0[7:0]B0[7:0]
RGB888B1[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]
RGB565R1[4:0]G1[5:3]G1[2:0]B1[4:0]R0[4:0]G0[5:3]G0[2:0]B0[4:0]
ARGB1555A1[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]
ARGB4444A1[3:0]R1[3:0]G1[3:0]B1[3:0]A0[3:0]R0[3:0]G0[3:0]B0[3:0]
L8L3[7:0]L2[7:0]L1[7:0]L0[7:0]
AL44A3[3:0]L3[3:0]A2[3:0]L2[3:0]A1[3:0]L1[3:0]A0[3:0]L0[3:0]
AL88A1[7:0]L1[7:0]A0[7:0]L0[7:0]
L4L7[3:0]L6[3:0]L5[3:0]L4[3:0]L3[3:0]L2[3:0]L1[3:0]L0[3:0]
A8A3[7:0]A2[7:0]A1[7:0]A0[7:0]
A4A7[3:0]A6[3:0]A5[3:0]A4[3:0]A3[3:0]A2[3:0]A1[3:0]A0[3:0]
A2A15[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]
A1A31A30A29A28A27A26A25A24A23A22A21A20A19A18A17A16A15A14A13A12A11A10A9A8A7A6A5A4A3A2A1A0
ARGB2222A3[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 = 0RBS = 1, APOS = 0RBS = 0, APOS = 1RBS = 1, APOS = 1
ARGB8888ABGR8888RGBA8888BGRA8888
RGB888BGR888RGB888BGR888
RGB565BGR565RGB565BGR565
ARGB1555ABGR1555RGBA5551BGRA5551
ARGB4444ABGR4444RGBA4444BGRA4444
ARGB2222ABGR2222RGBA2222BGRA2222

Chrom-ART2 accelerator controller (DMA2D)

RM0517

Pixel arrangement in memory

The pixels are arranged in scan line in the memory

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

Block diagram of DMA2D input PFC showing the flow from Bytes to Pixels through Expander, CLUT, multiplexers, and Alpha mode logic.

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.

Block diagram of DMA2D input PFC showing the flow from Bytes to Pixels through Expander, CLUT, multiplexers, and Alpha mode logic.

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
0000ARGB8888
0001RGB888
0010RGB565
0011ARGB1555
0100ARGB4444
0101L8
0110AL44
0111AL88
1000L4
1001A8
1010A4
1011JPEG
1100A2

770/3945

RM0517 Rev 1

STMicroelectronics logo
STMicroelectronics logo
Table 143. Supported color mode in input (continued)
CM[3:0]Color mode
1101A1
1110ARGB2222
1111Reserved

The color formats are coded as follows:

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:

Table 144. Alpha mode configuration
AM[1:0]Alpha mode
00No modification
01Replaced by value in DMA2D_xxPFCCR
10Replaced by original value multiplied by the value in DMA2D_xxPFCCR / 255
11Reserved

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:

The CLUT memory loading can be done in two different ways:

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
0000ARGB8888
0001RGB888
Table 145. Supported CLUT color mode (continued)
CM[3:0]CLUT color mode
0010RGB565
0011ARGB1555
0100ARGB4444
1110ARGB2222
othersReserved

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:

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):

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:

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):

As a consequence, the number of pixels per line (PL) + HPRE + HTRAIL must be aligned with the chosen chroma sub-sampling format:

The number of lines (NL) + VPRE + VTRAIL must be aligned with the chosen chroma sub-sampling format:

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.

MSv74130V1

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.

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:

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:

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:

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)ForegroundBackgroundOutput
00No scalerDMA2D_NLRDMA2D_NLRDMA2D_NLR
01Scale foregroundDMA2D_SNLRDMA2D_NLRDMA2D_NLR
10Scale backgroundDMA2D_NLRDMA2D_SNLRDMA2D_NLR
11Scale blender outputDMA2D_SNLRDMA2D_SNLRDMA2D_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

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:

The operation done by the tile buffers is selected by setting the following bits in the DMA2D tile buffer control register (DMA2D_TBCR):

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 SwapSource (SRC)ForegroundBackgroundOutput
WidthHeightWidthHeightWidthHeight
NoAnyPLNLPLNLPLNL
YesForegroundNLPLPLNL
BackgroundPLNLNLPL
BlenderNLPLNLPL

Figure 96. Tile buffer operations XYSEN = 0

Input diagram for Blit operation: shows a grid with a chip icon and orange scanline arrows moving from left to right. Output diagram for Blit operation: identical to input, showing a chip icon and left-to-right scanline arrows. Input diagram for Mirroring operation: shows a grid with a chip icon and orange scanline arrows moving from right to left. Output diagram for Mirroring operation: shows a horizontally mirrored chip icon and left-to-right scanline arrows. Input diagram for Rotation 180° Mirroring: shows a grid with a chip icon and orange scanline arrows moving from right to left. Output diagram for Rotation 180° Mirroring: shows a chip icon rotated 180 degrees and left-to-right scanline arrows. Input diagram for Rotation 180°: shows a grid with a chip icon and orange scanline arrows moving from right to left. Output diagram for Rotation 180°: shows a chip icon rotated 180 degrees and right-to-left scanline arrows.
InputOutput

XMEN = 0
YMEN = 0
XYSEN = 0

Blit

XMEN = 1
YMEN = 0
XYSEN = 0

Mirroring

XMEN = 0
YMEN = 1
XYSEN = 0

Rotation 180°
Mirroring

XMEN = 1
YMEN = 1
XYSEN = 0

Rotation 180°

MSv74131V3

Input diagram for Blit operation: shows a grid with a chip icon and orange scanline arrows moving from left to right. Output diagram for Blit operation: identical to input, showing a chip icon and left-to-right scanline arrows. Input diagram for Mirroring operation: shows a grid with a chip icon and orange scanline arrows moving from right to left. Output diagram for Mirroring operation: shows a horizontally mirrored chip icon and left-to-right scanline arrows. Input diagram for Rotation 180° Mirroring: shows a grid with a chip icon and orange scanline arrows moving from right to left. Output diagram for Rotation 180° Mirroring: shows a chip icon rotated 180 degrees and left-to-right scanline arrows. Input diagram for Rotation 180°: shows a grid with a chip icon and orange scanline arrows moving from right to left. Output diagram for Rotation 180°: shows a chip icon rotated 180 degrees and right-to-left scanline arrows.

Figure 97. Tile buffer operations XYSEN = 1

Input tile buffer operation: XMEN=0, YMEN=0, XYSEN=1. Shows a chip icon on a grid with vertical orange arrows pointing down and a dot at the top-left corner. Output tile buffer operation: XMEN=0, YMEN=0, XYSEN=1. Shows a mirrored chip icon on a grid with horizontal orange arrows pointing right and a dot at the top-left corner. Input tile buffer operation: XMEN=1, YMEN=0, XYSEN=1. Shows a chip icon on a grid with vertical orange arrows pointing up and a dot at the bottom-left corner. Output tile buffer operation: XMEN=1, YMEN=0, XYSEN=1. Shows a rotated chip icon on a grid with horizontal orange arrows pointing right and a dot at the top-left corner. Input tile buffer operation: XMEN=0, YMEN=1, XYSEN=1. Shows a chip icon on a grid with vertical orange arrows pointing down and a dot at the top-right corner. Output tile buffer operation: XMEN=0, YMEN=1, XYSEN=1. Shows a rotated chip icon on a grid with horizontal orange arrows pointing right and a dot at the bottom-left corner. Input tile buffer operation: XMEN=1, YMEN=1, XYSEN=1. Shows a chip icon on a grid with vertical orange arrows pointing up and a dot at the bottom-right corner. Output tile buffer operation: XMEN=1, YMEN=1, XYSEN=1. Shows a mirrored and rotated chip icon on a grid with horizontal orange arrows pointing right and a dot at the top-right corner.
InputOutput

XMEN = 0
YMEN = 0
XYSEN = 1
Rotation -90°
Mirroring

XMEN = 1
YMEN = 0
XYSEN = 1
Rotation +90°

XMEN = 0
YMEN = 1
XYSEN = 1
Rotation -90°

XMEN = 1
YMEN = 1
XYSEN = 1
Rotation +90°
Mirroring

MSv74132V3

Input tile buffer operation: XMEN=0, YMEN=0, XYSEN=1. Shows a chip icon on a grid with vertical orange arrows pointing down and a dot at the top-left corner. Output tile buffer operation: XMEN=0, YMEN=0, XYSEN=1. Shows a mirrored chip icon on a grid with horizontal orange arrows pointing right and a dot at the top-left corner. Input tile buffer operation: XMEN=1, YMEN=0, XYSEN=1. Shows a chip icon on a grid with vertical orange arrows pointing up and a dot at the bottom-left corner. Output tile buffer operation: XMEN=1, YMEN=0, XYSEN=1. Shows a rotated chip icon on a grid with horizontal orange arrows pointing right and a dot at the top-left corner. Input tile buffer operation: XMEN=0, YMEN=1, XYSEN=1. Shows a chip icon on a grid with vertical orange arrows pointing down and a dot at the top-right corner. Output tile buffer operation: XMEN=0, YMEN=1, XYSEN=1. Shows a rotated chip icon on a grid with horizontal orange arrows pointing right and a dot at the bottom-left corner. Input tile buffer operation: XMEN=1, YMEN=1, XYSEN=1. Shows a chip icon on a grid with vertical orange arrows pointing up and a dot at the bottom-right corner. Output tile buffer operation: XMEN=1, YMEN=1, XYSEN=1. Shows a mirrored and rotated chip icon on a grid with horizontal orange arrows pointing right and a dot at the top-right corner.

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:

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:4MCU1 (8×8 pixels)MCU2 (8×8 pixels)MCU3 (8×8 pixels)MCU4 (8×8 pixels)
Y1,1Cb1,1Cr1,1Y2,1Cb2,1Cr2,1Y3,1Cb3,1Cr3,1Y4,1Cb4,1Cr4,1
4:2:2MCU1 (16×8 pixels)MCU2 (16×8 pixels)MCU3 (16×8 pixels)
Y1,1Y2,1Cb1/2,1Cr1/2,1Y3,1Y4,1Cb3/4,1Cr3/4,1Y5,1Y6,1Cb5/6,1Cr5/6,1
4:2:0MCU1 (16×16 pixels)MCU2 (16×16 pixels)
Y1,1Y2,1Y1,2Y2,2Cb1/2,1/2Cr1/2,1/2Y3,1Y4,1Y3,2Y4,2Cb3/4,1/2Cr3/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:

As a consequence the maximum JPEG width is

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:

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 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:

\[\text{with } \alpha_{\text{Mult}} = \frac{\alpha_{\text{FG}} \cdot \alpha_{\text{BG}}}{255}\]

\[\alpha_{\text{OUT}} = \alpha_{\text{FG}} + \alpha_{\text{BG}} - \alpha_{\text{Mult}}\]

\[C_{\text{OUT}} = \frac{C_{\text{FG}} \cdot \alpha_{\text{FG}} + C_{\text{BG}} \cdot \alpha_{\text{BG}} - C_{\text{BG}} \cdot \alpha_{\text{Mult}}}{\alpha_{\text{OUT}}} \quad \text{with } C = R \text{ or } G \text{ or } B\]

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
0000ARGB8888
0001RGB888
0010RGB565
0011ARGB1555
0100ARGB4444
1110ARGB2222
othersReserved

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:

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
ARGB8888A0[7:0]R0[7:0]G0[7:0]B0[7:0]
RGB888B1[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]
RGB565R1[4:0]G1[5:3]G1[2:0]B1[4:0]R0[4:0]G0[5:3]G0[2:0]B0[4:0]
Table 150. Data order in memory (continued)
ARGB1555A1[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]
ARGB4444A1[3:0]R1[3:0]G1[3:0]B1[3:0]A0[3:0]R0[3:0]G0[3:0]B0[3:0]
ARGB2222A3[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 = 0RBS = 1, APOS = 0RBS = 0, APOS = 1RBS = 1, APOS = 1
ARGB8888ABGR8888RGBA8888BGRA8888
RGB888BGR888RGB888BGR888
RGB565BGR565RGB565BGR565
ARGB1555ABGR1555RGBA5551BGRA5551
ARGB4444ABGR4444RGBA4444BGRA4444
ARGB2222ABGR2222RGBA2222BGRA2222

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:

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
RGB888B1[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]
RGB565R1[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)

Diagram of Intel 8080 16-bit mode (RGB565) showing 16-bit data bus mapping to 16 color bits (R4-R0, G5-G0, B4-B0) for 64K colors.

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.

Diagram of Intel 8080 16-bit mode (RGB565) showing 16-bit data bus mapping to 16 color bits (R4-R0, G5-G0, B4-B0) for 64K colors.

18/24-bit mode (RGB888)

This mode needs data reordering:

Figure 99. Intel 8080 18/24-bit mode (RGB888)

Diagram of Intel 8080 18/24-bit mode (RGB888) showing two 16-bit data transfers for 16.7M colors, with color bit mapping for two pixels.

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.

Diagram of Intel 8080 18/24-bit mode (RGB888) showing two 16-bit data transfers for 16.7M colors, with color bit mapping for two pixels.

Table 153. Output FIFO byte reordering steps

Steps@ + 3@ + 2@ + 1@ + 0
Original data orderingB1[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]
Table 153. Output FIFO byte reordering steps (continued)
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

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:

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. 1. Set the CLUT address into DMA2D_FGCMAR.
  2. 2. Set the CLUT size with CS[7:0] in DMA2D_FGPFCCR.
  3. 3. Set the CLUT format CM[3:0] in DMA2D_FGPFCCR.
  4. 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:

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:

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:

\[\text{with } \alpha_{\text{Mult}} = \frac{\alpha_{\text{FG}} \cdot \alpha_{\text{BG}}}{255}\]

\[\alpha_{\text{OUT}} = \alpha_{\text{FG}} + \alpha_{\text{BG}} - \alpha_{\text{Mult}}\]

\[C_{\text{OUT}} = \frac{C_{\text{FG}} \cdot \alpha_{\text{FG}} + C_{\text{BG}} \cdot \alpha_{\text{BG}} - C_{\text{BG}} \cdot \alpha_{\text{Mult}}}{\alpha_{\text{OUT}}} \quad \text{with } C = R \text{ or } G \text{ or } B\]

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:

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:

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:

Each GPFLAG can:

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:

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

Diagram illustrating the Ring buffer and Linear command list structure. The Ring buffer is a circular buffer containing descriptors (Descriptor 1, Descriptor 2, Descriptor 3). The Head Pointer points to the start of the buffer, and the Write Pointer points to the end. Each descriptor points to a corresponding Linear buffer, which contains a sequence of instructions (Instruction 1, Instruction 2, Instruction 3, etc.) followed by an End marker.

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.

Diagram illustrating the Ring buffer and Linear command list structure. The Ring buffer is a circular buffer containing descriptors (Descriptor 1, Descriptor 2, Descriptor 3). The Head Pointer points to the start of the buffer, and the Write Pointer points to the end. Each descriptor points to a corresponding Linear buffer, which contains a sequence of instructions (Instruction 1, Instruction 2, Instruction 3, etc.) followed by an End marker.

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
31302928272625242322212019181716
POSTGPF3POSTGPF2POSTGPF1POSTGPF0PREGPF3PREGPF2PREGPF1PREGPF0
1514131211109876543210
Res.Res.Res.Res.SIZE[11:0]

Command list descriptor lower word @
31302928272625242322212019181716
ADDRESS[31:16]
1514131211109876543210
ADDRESS[15:0]

Linear command list instructions

The linear command list instructions can be the following:

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

313029282726252423222120191817161514131211109876543210
NOP00000000000000000000000000000000

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

313029282726252423222120191817161514131211109876543210
LD10000000000000000000ADDRESS[11:0]

LD instruction example:

Load the DMA2D foreground memory address register (DMA2D_FGMAR) with 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 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
313029282726252423222120191817161514131211109876543210
LDM0xxxxxxxxxxxxxxxxxxxx---x---xx--
DMA2D_CRx
DMA2D_IERx
DMA2D_IFCRx
DMA2D_FGMARx
DMA2D_FGORx
DMA2D_FGMSRx
DMA2D_FGPFCCRx
DMA2D_FGCOLRx
DMA2D_FGCMARx
DMA2D_BGMARx
DMA2D_BGORx
DMA2D_BGMSRx
DMA2D_BGPFCCRx
DMA2D_BGCOLRx
DMA2D_BGCMARx
DMA2D_OPFCCRx
DMA2D_OCOLRx
DMA2D_OMARx
DMA2D_OORx
DMA2D_NLRx
DMA2D_SBCRx
DMA2D_SBMARx
DMA2D_SBORx
DMA2D_SBMSRx
DMA2D_TBCRx
DMA2D_SCRx
DMA2D_SNLRx
DMA2D_SSRx
DMA2D_SPRx

LDM instruction example:

Load the DMA2D_FGMAR with 0x2400 0000, the DMA2D_FGOR with 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

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

313029282726252423222120191817161514131211109876543210
END11111111111111111111111111111111

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

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:

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:

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:

Separate interrupt enable bits are available for flexibility.

Table 159. DMA2D interrupt requests

Interrupt eventEvent flagEnable control bit
General purpose flag eventGPFxIFGPFxIE
Command list errorCLEIFCLEIE
Command list suspendedCLSIFCLSIE
Ring buffer errorRBEIFRBEIE
Ring buffer completedRBCIFRBCIE
Configuration errorCEIFCEIE
CLUT transfer completeCTCIFCTCIE
CLUT access errorCAEIFCAEIE
Transfer watermarkTWFTWIE
Transfer completeTCIFTCIE
Transfer errorTEIFTEIE

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.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.MODE[2:0]
rwrwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.LOMRes.Res.Res.ABORTSUSPSTART
rwrsrwrs

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:

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.GPF3IFGPF2IFGPF1IFGPF0IF
rrrr
1514131211109876543210
Res.Res.CLEIFCLSIFRes.Res.RBEIFRBCIFRes.Res.CEIFCTCIFCAEIFTWIFTCIFTEIF
rrrrrrrrrr

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 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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.GPF3 IEGPF2 IEGPF1 IEGPF0 IE
rwrwrwrw
1514131211109876543210
Res.Res.CLEIECLSIERes.Res.RBEIERBCIERes.Res.CEIECTCIECAEIETWIETCIETEIE
rwrwrwrwrwrwrwrwrwrw

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.

17.5.4 DMA2D interrupt flag clear register (DMA2D_IFCR)

Address offset: 0x018

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CGPF3
IF
CGPF2
IF
CGPF1
IF
CGPF0
IF
wwwr
1514131211109876543210
Res.Res.CCL
E
IF
CCLS
IF
Res.Res.CRBE
IF
CRBC
IF
Res.Res.CCEIFCCTC
IF
CCAE
IF
CTWIFCTCIFCTEIF
wwwwwwwwww

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.

RM0517column_2Bit 8 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1CRBCIF CCEIF CCTCIF CCAEIF CTWIF CTCIF0: Do nothing 0: Do nothing 0: Do nothing 0: Do nothing 0: Do nothing 0: Do nothingcolumn_6column_7column_8column_9column_10column_11column_12column_13column_14column_15column_16
Bit 0CTEIF : Clear transfer error interrupt flag
3130only. 29282726252423 MA[31:16]22212019181716
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
151413121110987 MA[15:0]6543210
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
RM0517 Rev 1807/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.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
LO[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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:

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.

31302928272625242322212019181716
Res.Res.Res.Res.VTRAIL[3:0]Res.Res.Res.Res.VPRE[3:0]
rwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.HTRAIL[3:0]Res.Res.Res.Res.HPRE[3:0]
rwrwrwrwrwrwrwrw

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.8column_2Bits 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 linescolumn_7column_8column_9column_10column_11column_12column_13column_14column_15column_16
31302928272625242322212019181716
ALPHA[7:0]Res.APOSRBSAICSS[1:0]AM[1:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
CS[7:0]Res.Res.STARTRes.CM[3:0]
rwrwrwrwrwrwrwrwrsrwrwrwrw
Bits 31:24ALPHA[7:0]: Alpha value
Bit 22APOS: Alpha position
Bit 21RBS : Red/Blue swap
RM0517 Rev 1809/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:

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.

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.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.RED[7:0]
rwrwrwrwrwrwrwrw
1514131211109876543210
GREEN[7:0]BLUE[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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.

ST logo
ST logo

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.

31302928272625242322212019181716
MA[31:16]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
MA[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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.

31302928272625242322212019181716
MA[31:16]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
MA[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
LO[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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:

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.

31302928272625242322212019181716
Res.Res.Res.Res.VTRAIL[3:0]Res.Res.Res.Res.VPRE[3:0]
rwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.HTRAIL[3:0]Res.Res.Res.Res.HPRE[3:0]
rwrwrwrwrwrwrwrw

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_1column_2Bits 19:16 Bits 11:8 Bits 3:0 only.VPRE[3:0] HPRE[3:0]HTRAIL[3:0]: Vertical pre linescolumn_7column_8column_9column_10column_11column_12column_13column_14column_15RM0517
31302928272625242322212019181716
ALPHA[7:0]Res.APOSRBSAICSS[1:0]AM[1:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
CS[7:0]Res.Res.STARTRes.CM[3:0]
rwrwrwrwrwrwrwrwrsrwrwrwrw
Bits 31:24ALPHA[7:0]: Alpha value
Bit 22APOS: Alpha position
Bit 21RBS : Red/Blue swap
Bit 20AI : 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:

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.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.RED[7:0]
rwrwrwrwrwrwrwrw
1514131211109876543210
GREEN[7:0]BLUE[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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.

31302928272625242322212019181716
MA[31:16]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
MA[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.APOSRBSAIRes.Res.Res.Res.
rwrwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.SBRes.Res.Res.Res.CM[3:0]
rwrwrwrwrw

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_1column_2Bits 3:0CM[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 modecolumn_7column_8column_9column_10column_11column_12column_13column_14column_15RM0517
3130292827 ALPHA[7:0]2625242322212019 RED[7:0]181716
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
GREEN[7:0] GREEN[7:0]BLUE[7:0] BLUE[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:24ALPHA[7:0]: Alpha channel value of the output color in ARGB8888 mode (otherwise reserved)
Bits 23:16RED[7:0]: Red value of the output image in ARGB8888 or RGB888 mode
Bits 15:8GREEN[7:0]: Green value of the output image in ARGB8888 or RGB888
Bits 7:0BLUE[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

ST logo
ST logo

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.

31302928272625242322212019181716
MA[31:16]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
MA[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
LO[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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:

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.

31302928272625242322212019181716
Res.Res.PL[13:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
NL[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
LW[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
DT[7:0]Res.Res.Res.Res.Res.Res.Res.EN
rwrwrwrwrwrwrwrwrw

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.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.AIRes.Res.Res.Res.
rw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.MODE[1:0]Res.Res.SRC[1:0]
rwrwrwrw

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.

31302928272625242322212019181716
MA[31:16]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
MA[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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.

31302928272625242322212019181716
ResResResResResResResResResResResResResResResRes
1514131211109876543210
LO[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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:

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.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.HTRAIL[3:0]Res.Res.Res.Res.HPRE[3:0]
rwrwrwrwrwrwrwrw

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.

ST logo
ST logo

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.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.XYSENYMENXMENRes.Res.SRC[1:0]
rwrwrwrwrw

Bits 31:7 Reserved, must be kept at reset value.

Bits 3:2 Reserved, must be kept at reset value.

ST logo
ST logo

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.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SRC[1:0]
rwrw

Bits 31:2 Reserved, must be kept at reset value.

Bits 1:0 SRC[1:0]: Source

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.

31302928272625242322212019181716
Res.Res.PL[13:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
NL[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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.

31302928272625242322212019181716
Res.Res.Res.Res.VSTEP[11:0]
rwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.HSTEP[11:0]
rwrwrwrwrwrwrwrwrwrwrwrw

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.

31302928272625242322212019181716
Res.Res.Res.Res.VPHASE[11:0]
rwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.HPHASE[11:0]
rwrwrwrwrwrwrwrwrwrwrwrw

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.GPF3 SCGPF2 SCGPF1 SCGPF0 SC
rwrwrwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.GPF3IC[1:0]GPF2IC[1:0]GPF1IC[1:0]GPF0IC[1:0]
rwrwrwrwrwrwrwrw

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.GPF3GPF2GPF1GPF0
rrrr

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SGPF3SGPF2SGPF1SGPF0
wwww

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.RGPF3RGPF2RGPF1RGPF0
wwww

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

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_1column_2Bit 2 Bit 1 Bit 0RGPF2 RGPF1 RGPF00: No effect 1: Reset GPF2 0: No effect 1: Reset GPF1 0: No effect 1: Reset GPF0column_6column_7column_8column_9column_10column_11column_12column_13column_14column_15RM0517
31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.RBS[2:0]Res.ABORT SUSP START
rwrwrwrsrwrs
Bits 6:4RBS[2:0]: Ring buffer size
Bit 2ABORT: Abort
ST logo
ST logo

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:

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.LCLMSELCLIELCLRERes.Res.Res.GPF3SGPF2SGPF1SGPF0SSUSPS
rrrrrrrr

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

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.

31302928272625242322212019181716
ADDRESS[31:16]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
ADDRESS[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.HP[13:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.WP[13:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

31302928272625242322212019181716
ADDRESS[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
ADDRESS[15:0]
rrrrrrrrrrrrrrrr

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.SIZE[11:0]
rrrrrrrrrrrr

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

31302928272625242322212019181716
ADDRESS[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
ADDRESS[15:0]
rrrrrrrrrrrrrrrr

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

31302928272625242322212019181716
ALPHA[7:0]RED[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
GREEN[7:0]BLUE[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

ST logo
ST logo

17.5.46 DMA2D background CLUTx (DMA2D_BGCLUTx)

Address offset: 0x800 + 0x4 * x, (x = 0 to 255)

Reset value: 0xXXXX XXXX

column_1column_2column_3column_4column_5column_6column_7column_8column_9column_10column_11column_12column_13column_14column_15RM0517
3130292827 ALPHA[7:0]2625242322212019 RED[7:0]181716
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
GREEN[7:0] GREEN[7:0]BLUE[7:0] BLUE[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:24ALPHA[7:0]: Alpha
Bits 23:16RED[7:0]: Red
Bits 15:8GREEN[7:0]: Green
Bits 7:0BLUE[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

ST logo
ST logo

17.5.47 DMA2D register map

Table 160. DMA2D register map and reset values

OffsetRegister name
reset value
313029282726252423222120191817161514131211109876543210
0x000DMA2D_CRRes.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.LOMRes.Res.Res.Res.ABORTSUSPSTART
Reset value0000000
0x004 - 0x00CReservedRes.
0x010DMA2D_ISRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.GPF3IFGPF2IFGPF1IFGPF0IFRes.Res.CLEIFCLSIFRes.Res.RBEIFRBCIFRes.Res.CEIFCTCIFCAEIFTWIFTCIFTEIF
Reset value0000000000000
0x014DMA2D_IERRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.GPF3IEGPF2IEGPF1IEGPF0IERes.Res.CLEIECLSIERes.Res.RBEIERBCIERes.Res.CEIECTCIECAEIETWIETCIETEIE
Reset value0000000000000
0x018DMA2D_IFCRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CGPF3IFCGPF2IFCGPF1IFCGPF0IFRes.Res.CCLIFCCLSIFRes.Res.CRBEIFCRBCIFRes.Res.CCEIFCCTCIFCAECIFCTWIFCTCIFCTEIF
Reset value0000000000000
0x01C - 0x03CReservedRes.
0x040DMA2D_FGMARMA[31:0]
Reset value00000000000000000000000000000000
0x044DMA2D_FGORRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.LO[15:0]
Reset value0000000000000000
0x048ReservedRes.
0x04CDMA2D_FGMSRRes.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 value0000000000000000
0x050DMA2D_FGPFCCRALPHA[7:0]Res.APOSRBSAICSS
[1:0]
AM
[1:0]
CS[7:0]Res.Res.STARTRes.CM[3:0]
Reset value000000000000000000000000000000
0x054DMA2D_FGCOLRRes.Res.Res.Res.Res.Res.Res.Res.RED[7:0]GREEN[7:0]BLUE[7:0]
Reset value00000000000000000000000
0x058DMA2D_FGCMARMA[31:0]
Reset value00000000000000000000000000000000
0x05C - 0x07CReservedRes.
0x080DMA2D_BGMARMA[31:0]
Reset value00000000000000000000000000000000
0x084DMA2D_BGORRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.LO[15:0]
Reset value00000000000000000
0x088ReservedRes.
0x08CDMA2D_BGMSRRes.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 value0000000000000000
0x090DMA2D_BGPFCCRALPHA[7:0]Res.APOSRBSAICSS
[1:0]
AM
[1:0]
CS[7:0]Res.Res.STARTRes.CM[3:0]
Reset value000000000000000000000000000000

Table 160. DMA2D register map and reset values (continued)

OffsetRegister name
reset value
313029282726252423222120191817161514131211109876543210
0x094DMA2D_BGCOLRResResResResResResResResRED[7:0]GREEN[7:0]BLUE[7:0]
Reset value000000000000000000000000
0x098DMA2D_BGCMARMA[31:0]
Reset value00000000000000000000000000000000
0x09C - 0x0BCReservedRes.
0x0C0DMA2D_OPFCCRResResResResResResResResResResAPOSRBSAIResResResResResResResResResResSBResResResResResCM[3:0]
Reset value00000000
0x0C4DMA2D_OCOLRALPHA[7:0]RED[7:0]GREEN[7:0]BLUE[7:0]
Reset value00000000000000000000000000000000
0x0C8DMA2D_OMARMA[31:0]
Reset value00000000000000000000000000000000
0x0CCDMA2D_OORResResResResResResResResResResResResResResResLO[15:0]
Reset value00000000000000000
0x0D0DMA2D_NLRResResPL[13:0]NL[15:0]
Reset value000000000000000000000000000000
0x0D4 - 0x0DCReservedReserved
0x0E0DMA2D_LWRResResResResResResResResResResResResResResResLW[15:0]
Reset value00000000000000000
0x0E4 - 0x0ECReservedRes.
0x0F0DMA2D_AMTCRResResResResResResResResResResResResResResResDT[7:0]ResResResResResResResResEN
Reset value000000000
0x0F4 - 0x0FCReservedRes.
0x100DMA2D_SBCRResResResResResResResResResResResAIResResResResResResResResResResResResResMODE[1:0]ResResSRC [1:0]
Reset value00000
0x104DMA2D_SBMARMA[31:0]
Reset value00000000000000000000000000000000
0x108DMA2D_SBORResResResResResResResResResResResResResResResLO[15:0]
Reset value00000000000000000
0x10CReservedRes.
0x110DMA2D_SBMSRResResResResResResResResResResResResResResResResResResResHTRAIL[3:0]ResResResResHPRE[3:0]
Reset value00000000
0x114 - 0x13CReservedRes.
0x140DMA2D_TBCRResResResResResResResResResResResResResResResResResResResResResResResResXYSENYMENXMENResSRC [1:0]
Reset value00000
0x144 - 0x17CReservedRes.
0x180DMA2D_SCRResResResResResResResResResResResResResResResResResResResResResResResResResResResResSRC [1:0]
Reset value00
ST logo
ST logo

Table 160. DMA2D register map and reset values (continued)

OffsetRegister name
reset value
313029282726252423222120191817161514131211109876543210
0x184DMA2D_SNLRResResPL[13:0]NL[15:0]
Reset value000000000000000000000000000000
0x188DMA2D_SSRResResResResVSTEP[11:0]ResResResResHSTEP[11:0]
Reset value000000000000000000000000
0x18CDMA2D_SPRResResResResVPHASE[11:0]ResResResResHPHASE[11:0]
Reset value000000000000000000000000
0x190 - 0x1FCReservedRes.
0x200DMA2D_GPFCRResResResResResResResResResResResResResResResResResResResResResResResResResResResResResResResRes
Reset value00000000000
0x204DMA2D_GPFRResResResResResResResResResResResResResResResResResResResResResResResResResResResResResResResRes
Reset value
0x208DMA2D_GPFSRResResResResResResResResResResResResResResResResResResResResResResResResResResResResResResResRes
Reset value
0x20CDMA2D_GPFRRResResResResResResResResResResResResResResResResResResResResResResResResResResResResResResResRes
Reset value
0x210 - 0x23CReservedRes.
0x240DMA2D_CLCRResResResResResResResResResResResResResResResResResResResResResResResResResResResResResResResRes
Reset value
0x244DMA2D_CLSRResResResResResResResResResResResResResResResResResResResResResResResResResResResResResResResRes
Reset value
0x248 - 0x24CReservedRes.
0x250DMA2D_RBBARADDRESS[31:0]
Reset value00000000000000000000000000000000
0x254DMA2D_RBHPRResResResResResResResResResResResResResResResResResResResResHP[13:0]
Reset value000000000000
0x258DMA2D_RBWPRResResResResResResResResResResResResResResResResResResResResWP[13:0]
Reset value000000000000
0x25CReservedRes.
0x260DMA2D_LBCBARADDRESS[31:0]
Reset value00000000000000000000000000000000
0x264DMA2D_LBCSRResResResResResResResResResResResResResResResResResResResResSIZE[11:0]
Reset value000000000000
0x268DMA2D_LBCARADDRESS[31:0]
Reset value00000000000000000000000000000000
0x26C - 0x3FCReservedRes.

Table 160. DMA2D register map and reset values (continued)

OffsetRegister name
reset value
313029282726252423222120191817161514131211109876543210
0x400 +
0x4*x,
(x=0 to
255)
DMA2D_
FGCLUTx
ALPHA[7:0]RED[7:0]GREEN[7:0]BLUE[7:0]
Reset valueXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0x800 +
0x4*x,
(x=0 to
255)
DMA2D_
BGCLUTx
ALPHA[7:0]RED[7:0]GREEN[7:0]BLUE[7:0]
Reset valueXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Refer to Section 2.3: Memory organization for the register boundary addresses.

ST logo
ST logo