cancel
Showing results for 
Search instead for 
Did you mean: 

Why engine hangs if I have a background image that do not have default pixel format ?

PJEN
Senior

I'm trying TouchGFX on a STM32H7B3I-DK board and managed to have it running with RGB565 pixel format. The first screen has an image has background and one image, one text area and one button on it. If the background image is specified with the default RGB565 format everything is fine but if I make it L8_RGB565 the drawing engine hangs and never return from backPorchExited() in TouchGFXHAL::taskEntry() function.

When using default RGB565 for background image I may change the image with a SetBitmap using an L8_RGB565, I may also switch to a second screen that has a L8 background image, so the problem is limited to the setup of the first screen.

Has someone encountered the same problem, or did I forget some initialisation of CLUT or ...

14 REPLIES 14
Martin KJELDSEN
Chief III

Hi @PJEN​,

You shouldn't need to do any CLUT initialization manually. Just to get you right, are you saying that it works when you use setBitmap() at run-time (not during setup)?

/Martin

Hello Martin,
Yes, exactly, it does not work during setup but it works if I call setBitmap() at run time with an L8_RGB565 full screen image.
I specify here that it’s a ‘full screen’ image (480x272) because I tried to make the first screen with a full screen BOX filled with a solid color as background + a smaller png image coded in L8_ARGB8888 (as I needed transparent pixels) … and this also works at setup time !!
BR,
Pierre

Okay, before i dive into this i'd like to ask if you've done any debugging to see where the application is hanging?

/Martin

Hello,
I followed the code until it reaches TouchGFXHAL::taskEntry() where it enters backPorchExited() then tick() … where it goes in the lib (and so in Assembly for me !! )
… and never returns :(
BR
Pierre

Okay, thanks @PJEN​ ! Does this also happen on the simulator?

/Martin

No, the simulator runs fine, it’s only on the target
Pierre

Okay, great - I'll see what i can find. Is it possible for you to share your project, or part of it that shows the issue? That'll save me some time.

/Martin

Yes, I will do it but let me some time as the current project has evolved (Freertos replaced by an other OS etc … ) and so I have to make a new and simpler one ;)
stay tuned
Here is a project showing the problem. https://twindev-my.sharepoint.com/:u:/g/personal/p_jenard_twindev_onmicrosoft_com/EW0Rs5Sva3BIkj16S6eypPkB4rZgMZzEIzKwigMQUF_AxQ?e=u6KIrV <> A new clue is that the problem is also present with a 24 bits framebuffers (I first see it with 565 framebuffers) I just started a new project with the ‘Blank’ template on a STM32H7B3DK discovery board. Just changed to PWR_REGULATOR_VOLTAGE_SCALE0 in SystemClock_Config() in main.cpp otherwise target won’t start !! When the image ‘green256’ is generated with default format, all is right but if you change image format to L8_RGB888 … screen is black and program hangs!! BR Pierre