cancel
Showing results for 
Search instead for 
Did you mean: 

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?

dibadigital
Associate

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 */
 
}

2 REPLIES 2
Yoann KLEIN
ST Employee

Hey @dibadigital​ ,

Which version of TouchGFX are you using ?

Which compiler ?

Thanks,

/Yoann

Yoann KLEIN
ST Software Developer | TouchGFX

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