cancel
Showing results for 
Search instead for 
Did you mean: 

STemWin display .JPG

Duy Tran
Associate II
Posted on January 14, 2018 at 05:42

Hello,

I am trying to use the STemWin 5.40 in the STM32F7Cube 1.8 pack with my F746-DISCO. The basic display works fine until I tried to display an .jpg image on the LCD. The original image is: 0690X00000604G2QAI.jpg

While the display on the LCD is: 0690X00000604HtQAI.jpg

I used the Memory device to store the code like this: 

/* My code begins */

GUI_MEMDEV_Handle GUImem;

BSP_SDRAM_Init(); /* Initializes the SDRAM device */

__HAL_RCC_CRC_CLK_ENABLE();

GUI_Init();

GUI_Clear();

GUI_SelectLayer(1);

GUImem = GUI_MEMDEV_Create(0, 0, 480, 272);

GUI_MEMDEV_Select(GUImem);

GUI_JPEG_Draw(_acgundam1, sizeof(_acgundam1), 0, 0);

GUI_DrawLine(0, 0, 99, 99);

GUI_MEMDEV_Select(0);

GUI_SelectLayer(0);

GUI_MEMDEV_CopyToLCD(GUImem);

/* My code ends */

Can anyone gives me a hint or a way to fix this error? Or may be some references is fine too. Thank you very much!

Duy

#stm32f746-discovery #stemwin #stemwin-stm32f746discovery #stme32-cube #stm32f746-discovery
6 REPLIES 6
T J
Lead
Posted on January 14, 2018 at 22:06

did you check the polarity and phase of your clock signal ?

Posted on January 15, 2018 at 18:31

Hi TJ,

Yes I did, this is my clock config with the CubeMX

0690X00000609KPQAY.png
Posted on January 16, 2018 at 00:15

are you using 5-6-5 format ?

did you check the dot rate ?

20MHz to the LCD seems low.

Maybe someone from the ST team will know about an example to use the STemWin 5.40 in the STM32F7Cube 1.8 pack with the F746-DISCO

Posted on January 16, 2018 at 17:02

I am sorry but I haven't heard about 

5-6-5 format

The image I use is the same resolution as the screen too.

I remember there used to be a tutorial about loading an image into STemWin but I don't know where to find it. This problem only happens when I try to display an image. When I work with the UI I create on GUI builder it works fine.

T J
Lead
Posted on January 17, 2018 at 00:55

there are several physical requirements for an LCD.

the Dot rate must be closeish and the phase and polarity correct.

the data length 16bit/18bit/24bit must be set correctly for the connections you have, that set the colour format.

Thats usually 16 bit 5:6:5 = R:G:B

Posted on January 18, 2018 at 03:19

Thanks TJ,

I guess I should check the datasheet of the F746-DISCO since I don't know much about the its LCD. Hope it would work.

The STemWin has so few example though =]]]

Best regards,

    Duy