Skip to main content
dibadigital
Associate
September 6, 2022
Question

I have a problem in my TFT LCD project. I use LTDC, FMC, SDIO, and Touchgfx. I read all of the images in stm32f429 from the SD card. some of the images in my project don't load correctly. what should I do? and what is the reason?

  • September 6, 2022
  • 1 reply
  • 1708 views

0693W00000Subh1QAB.jpgas shown in this picture (the top picture is in Touchgfx and the bottom picture is in my LCD board) some images in my LCD don't load correctly!

my code :

void StartDefaultTask(void const * argument)
 
{
 
 /* USER CODE BEGIN 5 */
 
 
 
 f_mount(&SDFatFs, SDPath, 0);
 
 
 
 f_open(&MyFile, "image_icon_center_normal.bin", FA_READ);
 
 size = f_size(&MyFile);
 
 res = f_read(&MyFile, (void*) 0xc0139200, size, (UINT*)&bytesread);
 
 f_close(&MyFile);
 
 
 
 f_open(&MyFile, "image_bg22.bin", FA_READ);
 
 size = f_size(&MyFile);
 
 res = f_read(&MyFile, (void*) 0xc00f9600, size, (UINT*)&bytesread);
 
 f_close(&MyFile);
 
 
 
 f_open(&MyFile, "image_bg2.bin", FA_READ);
 
 size = f_size(&MyFile);
 
 res = f_read(&MyFile, (void*) 0xc00f3200, size, (UINT*)&bytesread);
 
 f_close(&MyFile);
 
 
 
 f_open(&MyFile, "image_bg0.bin", FA_READ);
 
 size = f_size(&MyFile);
 
 res = f_read(&MyFile, (void*) 0xc00f0000, size, (UINT*)&bytesread);
 
 f_close(&MyFile);
 
 
 
 MX_TouchGFX_Process();
 
 
 
 /* Infinite loop */
 
 for(;;)
 
 {
 
 osDelay(1);
 
 }
 
 /* USER CODE END 5 */
 
}

This topic has been closed for replies.

1 reply

Yoann KLEIN
ST Employee
September 7, 2022

Hey @dibadigital​ ,

Which version of TouchGFX are you using ?

Which compiler ?

Thanks,

/Yoann

Yoann KLEINST Software Developer | TouchGFX
dibadigital
Associate
October 26, 2022

Hi,

My problem is solved. The reason was that the image was corrupted. In fact, I had changed the resolution of an image with paint, and it was broken. I had to change it with Photoshop.

Thanks