DMA2D (Chrom-ART Accelerator) demonstration

Presentation

The DMA2D integration is the keystone to graphics potential of the STM32F429. Through a set of registers, it provides graphics management features that include:

handling of bitmap files (up to 32 bits per pixel),

management of image overlays, with or without transparency/blending,

handling of object display to include multiple objects and their positions, sizes and layering (Z-order).

The CircleOS provides a specific API for easily implement these features by integration of the DMA2D peripheral and SDRAM driver.
This API covers:

Handling of bit maps (display, overlaying and moving)

Using transparency (pixel-level, global and blending)

Dynamic versus Read-Only objects

Management of objects and touch sensing

Use of layering (Z-order)

DMA2D Integration in STM32F429 and CircleOS

The DMA2D hardware

The DMA2D particularly is advantageous for managing displayed graphics.

These integrated features include:

Two input pixel formats converters (PFC). These blocks are able to read and to decode the bitmaps files.

The blender, which computes and mixes the data from the two input PFC.

The ouput PFC, that decodes the information to be sent to the destination.

The FIFOs used for both the inputs and the outputs connected to a specific DMA controller.

Integrating blending, encoding and decoding functionality in the microcontroller itself, relieves these requirements from the application and the core that would otherwise be required for this.

Large Internal Memory

The STM32F429 contains up to 2MB of internal FLASH.
In FLASH, a 320 x 240 pixel image requires a bit more than 75 K bytes when the colors are indexed in a 256-byte palette. Therefore, a few background images can be stored without problems.

SDRAM Controller

Storing bitmaps in FLASH is easy as long as there are not too many big pictures. But storing an editable object in RAM is more difficult to manage, since the size of the internal SRAM is always much smaller than the size of the internal FLASH.
Instead of embedding a very large internal SRAM, the new STM32F429 features an internal controller for an external SDRAM.
The STM32F429 EvoPrimer is equipped with 2Mb SDRAM, which can be used for large dynamic graphic objects.

Image of the Screen in RAM

The CircleOS version for STM32F429 EvoPrimer/Open4 kepts an image of the screen in the SDRAM.
This is because it is not convenient to address the RAM of the LCD on these hardware platforms.
This image is sent (using the DMA) to the LCD when a DMA2D_ScreenRedraw has been executed.
This mode allows management of several screen images in SDRAM, and performing of rapid switches between these screens.
In the case of CircleOS, one Megabyte (half of the SDRAM) is reserved for the use of the DMA2D: