cancel
Showing results for 
Search instead for 
Did you mean: 

How to copy an image to RAM in TouchGFX?

PKunK.1
Associate III

We are working on the project using TouchGFX on the stm32f469 board.

If you repeatedly display the screen made with TouchGFX as you proceed, the screen disappears. That doesn't mean the equipment stops. In debug terms, the timer is operating normally.

There is a problem above, so I am going to approach it in a different way.

The TouchGFX displays the Screen on the LCD while reading it every time in Flash. I want to know how to use the picture on RAM, not on Flash.

When the system starts up, it copies the image data stored in Flash to RAM, and if it needs to be displayed, reads the data from RAM to display the screen, and if you know a document or method that can be used as a reference, can you advise me?

4 REPLIES 4
Romain DIELEMAN
ST Employee

Hi,

I am not sure I fully understand your second sentence :grinning_face_with_sweat: What happens when the screen "disappears" ? Do you get a black display ? If you project does not hit hardfault I suppose it means that the project gets stuck in rendering and never transfers the updated display. There could be different reasons for it I guess.

Concerning puttin the picture on RAM, do you mean storing your images in RAM ? If yes I can guide you to the "Using non memory mapped flash to store images" article.

/Romain

​LCD is a black display.

I suppose it means that the project gets stuck in rendering and never transfers the updated display.  ==>

Can you tell me where to look if you tell me the reason why you talked?

The settings related to LCD are as follows.

#define   lcd_x_size   480

#define   lcd_y_size   854

#define   VSA     2    /*!< Vertical start active time in units of lines */

#define   VBP     20 /*!< Vertical Back Porch time in units of lines */

#define   VFP     20   /*!< Vertical Front Porch time in units of lines */

#define   HSA      2    /*!< Horizontal start active time in units of lcdClk */

#define   HBP      60  /*!< Horizontal Back Porch time in units of lcdClk */

#define   HFP       20   /*!< Horizontal Front Porch time in units of lcdClk */

//    (2+20+20+480)*(2+60+20+854)*60 = 30213

#define   LcdClock       30213 

#define  HACT      lcd_x_size /*!< Horizontal Active time in units of lcdClk = imageSize X in pixels to display */

#define  VACT      lcd_y_size /*!< Vertical Active time in units of lines = imageSize Y in pixels to display */

#define  laneByteClk_kHz    62500     /* 500 MHz / 8 = 62.5 MHz = 62500 kHz */

PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_LTDC;

PeriphClkInitStruct.PLLSAI.PLLSAIN = 423;

 PeriphClkInitStruct.PLLSAI.PLLSAIR = 6;

PeriphClkInitStruct.PLLSAIDivR = RCC_PLLSAIDIVR_2;

static DSI_VidCfgTypeDef hdsivideo_handle;

hdsivideo_handle.ColorCoding = DSI_RGB565;

hdsivideo_handle.VSPolarity = DSI_VSYNC_ACTIVE_LOW;

hdsivideo_handle.HSPolarity = DSI_HSYNC_ACTIVE_LOW;

hdsivideo_handle.DEPolarity = DSI_DATA_ENABLE_ACTIVE_HIGH;

hdsivideo_handle.Mode = DSI_VID_MODE_BURST; /* Mode Video burst ie : one LgP per line */

hdsivideo_handle.NullPacketSize = 0xFFF;

hdsivideo_handle.NumberOfChunks = 0;

hdsivideo_handle.PacketSize               = HACT; /* Value depending on display orientation choice portrait/landscape */

hdsivideo_handle.HorizontalSyncActive     = (HSA * laneByteClk_kHz) / LcdClock;

hdsivideo_handle.HorizontalBackPorch      = (HBP * laneByteClk_kHz) / LcdClock;

hdsivideo_handle.HorizontalLine           = ((HACT + HSA + HBP + HFP) * laneByteClk_kHz) / LcdClock; /* Value depending on display orientation choice portrait/landscape */

hdsivideo_handle.VerticalSyncActive       = VSA;

hdsivideo_handle.VerticalBackPorch        = VBP;

hdsivideo_handle.VerticalFrontPorch       = VFP;

hdsivideo_handle.VerticalActive           = VACT; /* Value depending on display orientation choice portrait/landscape */

It is approximately a set-up value.

Can you give me some advice to solve this problem?

I wish you good health.

MKris.5
Associate II

Hi @PKunK.1 (Customer)​ ,

Can you please share me the ILI9806E code for initializing the ILI9806E module.

I can't change the LCD orientation . Currently set it as 480p width and 800p height. i wanna change it to 800 width and 480 height.

Thanks,

meimurgan

MKris.5
Associate II

Hi @PKunK.1 (Customer)​, @Romain DIELEMAN​  ,

Can you please share me the ILI9806E code for initializing the ILI9806E module.

I can't change the LCD orientation . Currently set it as 480p width and 800p height. i wanna change it to 800 width and 480 height.

Thanks,

meimurgan