cancel
Showing results for 
Search instead for 
Did you mean: 

Screen suddenly started flickering every 12 seconds at 350MHz, but is not flickering at 480MHz. Too many drawables?

GHeller
Associate III

The screen of my H750B-DK board is weirdly flickering every 12 seconds when the system clock is set to 350MHz. Previously I was at 400MHz when the issue first appeared and the flicker happened about every 10 seconds. At 480Mhz (max) the issue seems to be gone.

The issue is presented on the video below (for 350MHz):

https://youtu.be/M4nj6cP3B6U

The issue appeared randomly after implementing a new feature (a new class containing all MQTT publish message functionality). I have hooked up one class to have access to tick events but there is only one if statement within it with very little code and also it is not run every 12 seconds but rather when a hardware event happens (MQTT disconnection) so this is not it.

I am also using tick events in my main screen but there is only an empty placeholder if statement and another if statement for checking a FreeRTOS queue for data (for sending error codes from hardware to TouchGFX for display).

I am using no custom interrupt or timer routines yet. This is why I have no idea how such an issue could suddenly arise seemingly out of nowhere (because to my understanding the size of my code should not affect the screen rendering at all, right?).

I looked for some unnecessary calls to invalidate() but no invalidate() is called on a timer (except for that one if statement mentioned earlier). All my invalidates happen on button presses.

I'd rather find a cause of this than use 480MHz praying that the issue won't return as I am about 1/3 into the development of this app and the issue appearing at max frequency too would be disastrous.

Does anyone have any idea what might be wrong here? I would prefer avoiding publishing my whole project online but if some files would be helpful I can publish them.

PS. Could this be an issue with too many drawables (even invisible ones) at one screen at the same time? Because I was planning on using just one screen for everything to make my job easier (MQTT, CAN, SD card), with the help of some sliding containers. But just now I have removed two custom containers that I was planning to use earlier but scrapped the idea, and the issue seems to be gone at 400MHz. Is this it? Should I move to using multiple screens?

Edit: Okay so I added drawables until the RAM couldn't handle it anymore but the issue didn't return even at 400MHz today, which to be honest isn't very reassuring as the source of the trouble seems to magically be gone, therefore can return at any time.

Anyway, I have proceeded to invest some time into switching to MVP design pattern, because I started to see how it could potentially make my work easier in the future and the project better overall.

I would still very much appreciate any input on the issue from anyone who can have even the slightest idea what might have gone wrong yesterday.

1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

Ok, I think we know where the issue is then. We made a correction with TBS version 3.0.8 that fixes this issue. So I suggest you to try with the latest version of the TBS, with TouchGFX Designer 4.20.0 .

If you want to keep using TouchGFX Designer 4.18.1, you need to activate the option "optimize most" in STM32CubeIDE. Here's how you can do it :

1- Right click on your project > Properties

0693W00000QLGL6QAP.png 

2- In Settings > Tool Settings > MCU GCC Compiler > Optimization > Select optimization level "Optimize most (-O3)

Do the same with MCU G++ Compiler > Optimization > Optimize most

0693W00000QLGLfQAP.png 

3- Do the same with Release configuration

0693W00000QLGM9QAP.png 

4- Apply and close, then recompile your project.

Let me know if that works.

/Osman

Osman SOYKURT
ST Software Developer | TouchGFX

View solution in original post

6 REPLIES 6
MM..1
Chief III

Locate point of your trouble primary in ticks model and screen. Comment parts out .

Normal display as your can work fine from 100Mhz... Is used single buffer or double?

Thanks for reply!

I use the default template buffer which is double.

Model tick is empty. I moved everything to Screen tick because I was supposed to use only one screen so I found it redundant to call from Model. And Screen tick contains only two if statements, one is empty and the other is for a queue. I could comment out the queue when I get back to work, though it's been working without issues until I added the new container which you can see on the video. The new container is not hooked to ticks. Everything is done on button press so there is no reason it would cause the screen to flicker, unless I have too many drawables on one screen (and I have a lot, what you see one the video is barely the tip of it).

Osman SOYKURT
ST Employee

Hello GHeller,

Could you give more information about your configuration please ?

  • Which version of TouchGFX Designer do you use ?
  • Which version of the TBS (TouchGFX board setup) do you use ?
  • Which compiler do you use ?

/Osman

Osman SOYKURT
ST Software Developer | TouchGFX

Hello. Thank you for reply.

I am using TGFX 4.18.1

Board Setup is I believe 3.0.7, though I am sorry I do not know how to check it.

I am flashing the board from CubeIDE, which I believe uses GCC compiler from GNU Tools for STM32 (10.3-2021.10) from CubeIDE 1.9.0.

This anomaly appeared as suddenly as it disappeared. Hopefully it doesn't reappear.

Hello,

Ok, I think we know where the issue is then. We made a correction with TBS version 3.0.8 that fixes this issue. So I suggest you to try with the latest version of the TBS, with TouchGFX Designer 4.20.0 .

If you want to keep using TouchGFX Designer 4.18.1, you need to activate the option "optimize most" in STM32CubeIDE. Here's how you can do it :

1- Right click on your project > Properties

0693W00000QLGL6QAP.png 

2- In Settings > Tool Settings > MCU GCC Compiler > Optimization > Select optimization level "Optimize most (-O3)

Do the same with MCU G++ Compiler > Optimization > Optimize most

0693W00000QLGLfQAP.png 

3- Do the same with Release configuration

0693W00000QLGM9QAP.png 

4- Apply and close, then recompile your project.

Let me know if that works.

/Osman

Osman SOYKURT
ST Software Developer | TouchGFX

Unfortunately (or fortunately) I cannot tell if it helped because the issue went away by itself yesterday.

I did it though and it did not cause any other issues, so I'm gonna believe this was it for now.

Thank you!