EasyManua.ls Logo

ST STM32L496 Series User Manual

ST STM32L496 Series
22 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #11 background imageLoading...
Page #11 background image
DocID029937 Rev 2 11/22
AN4943 Chrom-ART Accelerator™ (DMA2D) configuration in STM32CubeL4
21
4 Chrom-ART Accelerator™ (DMA2D) configuration in
STM32CubeL4
4.1 LCD partial refresh
An example configuring the DMA2D for an LCD partial refresh is provided in the
STM32Cube examples:
STM32Cube_FW_L4\Firmware\Projects\STM32L496G-Discovery\Examples\DMA2D\
DMA2D_MemToMemWithLCD.
The code used to configure and start the DMA2D is shown below:
/* Configure LCD before image display: set first pixel position and image
size */
/* the position of the partial refreshed window is defined here. A rectangle
in the middle of the screen */
LCD_ImagePreparation((ST7789H2_LCD_PIXEL_WIDTH - LAYER_SIZE_X)/2,
(ST7789H2_LCD_PIXEL_HEIGHT - LAYER_SIZE_Y)/2, LAYER_SIZE_X, LAYER_SIZE_Y);
/*##-2- DMA2D configuration
################################################*/
DMA2D_Config();
/*##-3- Start DMA2D transfer
###############################################*/
hal_status = HAL_DMA2D_Start_IT(&Dma2dHandle,
(uint32_t)&RGB565_240x160, /* Source buffer in format RGB565 and size
240x160 */
(uint32_t)&(LCD_ADDR->REG), /* LCD data address */
1, LAYER_SIZE_Y * LAYER_SIZE_X); /* number of pixel to transfer */
OnError_Handler(hal_status != HAL_OK);
/**
* @brief DMA2D configuration.
* @note This function configure the DMA2D peripheral :
* 1) Configure the transfer mode : memory to memory
* 2) Configure the output color mode as RGB565
* 3) Configure the transfer from FLASH to SRAM
* 4) Configure the data size : 240x160 (pixels)
* @retval
* None
*/
static void DMA2D_Config(void)
{
HAL_StatusTypeDef hal_status = HAL_OK;
/* Configure the DMA2D Mode, color Mode and output offset */
Dma2dHandle.Init.Mode = DMA2D_M2M; /* DMA2D Mode memory to memory */

Table of Contents

Question and Answer IconNeed help?

Do you have a question about the ST STM32L496 Series and is the answer not in the manual?

ST STM32L496 Series Specifications

General IconGeneral
BrandST
ModelSTM32L496 Series
CategoryMicrocontrollers
LanguageEnglish

Summary

Reference documents

Chrom-ART Accelerator™ (DMA2D) application use case overview

LCD-TFT display on FSMC

Hardware interface description

Details signals used for FSMC to LCD-TFT display connection.

Display Command Set (DCS) software interface

Describes control via FSMC bus using software commands.

Controlling the D/CX signal with STM32L496xx/L4A6xx/L4Rxxx/L4Sxxx microcontrollers

Explains D/CX signal for distinguishing commands from data transfers.

Chrom-ART Accelerator™ (DMA2D) configuration in STM32CubeL4

LCD partial refresh

Provides an example of DMA2D configuration for LCD partial refresh.

New DMA2D features to support Intel 8080 displays

Intel 8080 interface color coding

Explains Intel 8080 color coding and its mismatch with STM32 memory.

DMA2D reordering features

Covers DMA2D output FIFO reordering for display alignment.

DMA2D reordering use case examples

Demonstrates DMA2D operations for byte order in display interfaces.

Conclusion

Revision history

Related product manuals