cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7S78-DK error RGB888

Leo_Berna99
Associate II

Hello everyone, I present my problem.


I am doing a simple project with Touch GFX on my Discovery STM32H7S78-DK. My main goal is to display images (the ones provided by touchGFX) in RGB888.
I created the project and moved to CubeMX to view the .ioc file and change the various fields the RGB format from 565 to 888. I changed both on the LTDC and pixel format tab and automatically in Middleware->TouchGFX the change was taken.

So far so good.

Filling in the automatically generated code, without any personal additions, and after regenerating the code with TouchGFX I get the following error:
undefined reference to `touchgfx::paint::rgb888::lineFromColor(unsigned char*, unsigned int, unsigned long, unsigned char)'
Which I fix by following the following link : https://support.touchgfx.com/4.20/docs/miscellaneous/known-issues.
Fixed this I compile the code, load the firmware on my dk but the screen appears black (Backlight On but totally black).

Debugging and hitting the pause button the program is stuck in HAL_GPU2D_ErrorCallback as shown in the figure below.
Unfortunately, the values of the registers cannot be accessed from Datasheet because private.


How can I do to see correctly on my Discovery in RGB888 format?

9 REPLIES 9
GaetanGodart
ST Employee

Hello @Leo_Berna99 ,

 

We have made a TBS (TouchGFX Board Setup) for the STM32H7S7-dk in 16bpp but also one in 24bpp :

GaetanGodart_0-1731662141567.png

Simple select the 24bpp and it should do what you want.

 

You can also create a project with both and look at the differences between them to see what we have changed to make it possible and compare that with the changes you have made yourself to see what was missing.

 

I hope this helps!
If this comment answers your question, I invite you to select it as "best answer".

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

Thank you for your immediate response.
However, I don't think the problem has been fixed with the new update, in fact I find the same errors again.
Meanwhile, opening the project on CubeMX I find the following error (error I find without having modified anything) see image "error" below.

error.png

Updated the code and simply doing the project build I find the error in image 2.

error2.png

Once I fixed the error in image 2 via tutorial on known problems the screen appears to me as in image 3.

image3.jpg

Hello @Leo_Berna99 ,

 

I suggest you to use the latest version of TouchGFX, STM32CubeIDE and STM32CubeMX.

The width cannot be between 0 and 0, I think the version of STM32CubeMX you are using is incompatible.

 

Have you tried to open TouchGFX Designer, create a new project, select the STM32H7S7-dk board in 24 bpp, flash and run from TouchGFX Designer?

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

Goodmorning,

Yes, I'm using the latest version of all software but didn't seem to be working anyway.

TouchGFX Designer version 4.24.1

CubeMX version 6.12.1

STM32CubeIDE version 1.16.1

I've tried that but apart for the error in the width selection the pixel format is ARGB8888 and not RGB888.

I don't know if that is a workaround because with this MCU the GPU2D can't handle the RGB888 format natively.

Thanks for your help

 

Hello @Leo_Berna99 ,

 

Your version of STM32CubeMX seems to not be the latest based on its looks.
Here is my STM32CubeMX (notice that the image width is between 0 and 8191) :

GaetanGodart_0-1731937213274.png

 


I've tried that but apart for the error in the width selection the pixel format is ARGB8888 and not RGB888.


What have you tried? Creating a 24 bpp project from TouchGFX Designer?
The format for the 24 bpp project is RGB888.:

GaetanGodart_1-1731937491599.png

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

This is my version of CubeMX. I literally just re-downloaded the latest version on ST website and the error seems to be persistent.

Leo_Berna99_1-1731940612360.png

 

So to summarize:
I opened the project with the new version of TouchGFX (STM32H7S8-DK 24BPP).

I insert three colored circles and a generic background. I generate the code and open with CubeMX the .ioc file.

This file generates the error on the frame buffer width for me by default (keeps it fixed at 0).


I change the pixel format from ARGB8888 (The .ioc file of Touch GFX Designer 24 bpp has this as default for me) to RGB888, I make no other changes on CubeMX.


Generating to this time the code for STM32CubeIDE and compiling I get the following error as at the beginning. 

`touchgfx::paint::rgb888::lineFromColor(unsigned char*, unsigned int, unsigned long, unsigned char)'.

So, to me, It seems that nothing has change.

 

 

 

 

Hello @Leo_Berna99 ,

 

Yes, it is because ac you said, NeoChrom doesn't support 24bbp on the STM32H7S7.
So the rendering is done is 32bpp but the displaying (framebuffer) is in 24bpp, this give the best performance.

What if you keep the pixel format as it is? Would that work for you?

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

Hello, 

Yes, that would work for me, I don't see any other option to have a RGB888 frame buffer.

So do you confirm that if in CubeMX I select for the pixel format ARGB8888 the output in the frame buffer is RGB888?

Is there any way I can check that?

Thank you for your time.

I have also another question. 

ARGB8888 image are pretty big, and in a complex project the space in the external flash won't be enough.

Can you suggest me any link to a project or any way in which I can dynamically access image from an SD card instead of the external flash?

Thanks