cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX does not draw anything

AWies.1
Associate III

I am new to TouchGFX, so I am starting with something simple, displaying an image on the screen. I am using a custom STM32H753 board, where the display is hooked up through the LTDC interface. The display is working properly; when I write manually to the frame buffer, then the data gets displayed correctly. I was using the TouchGFX designer to create the screen with the image, and I set it as boot display. However, the image never appears on the screen. I checked that the task for touchgfx is created and also entered. Also the LTDC line interrupt is generated correctly. I am not sure in which part of the code, which TouchGFX is generating the actual drawing take place. So far I could not locate any code, which actually draws to the frame buffer. I found some shells for drawing functions, but they are all doing nothing. So something seems to be fundamentally wrong here, and I am missing the starting point where I can look. Can someone give me a hint why I am not getting anything drawn on the screen?

1 ACCEPTED SOLUTION

Accepted Solutions
Alexandre RENOUX
Principal

Hello,

It's the signalVSync() function that indicates to the framework to render and re-fill the framebuffer with a new frame.

If you managed to display something on your screen manually, this means that your display and internal RAM are normally working properly.

But if you use an image, it will be stored in external Flash. So make sure your external flash is correctly configured.

/Alexandre

View solution in original post

13 REPLIES 13
Alexandre RENOUX
Principal

Hello,

It's the signalVSync() function that indicates to the framework to render and re-fill the framebuffer with a new frame.

If you managed to display something on your screen manually, this means that your display and internal RAM are normally working properly.

But if you use an image, it will be stored in external Flash. So make sure your external flash is correctly configured.

/Alexandre

AWies.1
Associate III

Thanks, but is a little bit more complicated. I put a break point on the signalVSync function, and I know that the LTDC interrupt calls this function repetitively. Then I put a break point inside the OSWrapper::waitForVSync functions, and I am getting a different behavior dependent on if DMA2D is activated or not. If it is not, then this function is being entered repetitively, but nothing ever gets written into the frame buffer. If DMA2D is activated, then this function is entered exactly twice, and then never again. I cannot trace down what happens inside the code which calls the waitForVSync function, since this is part of the library, for which there is no source code. Something goes wrong inside the library, and I have no way to find out what it is. I suspect that something is configured wrongly, but I have no hint what it could be. I set my the STM32H753 with CubeMX from within the STM32CubeIDE as development system. In my system I have an 8MB SDRAM attached, but no external FLASH, so TouchGFX is configured for internal FLASH only.

Alex

Alexandre RENOUX
Principal

Hello,

In this case, it's quite complicated to pinpoint the issue.

What I suggest is to take the Application Template H750B-DK available on the Designer, create your project and make changes according to your custom display parameters.

The H750 and H753 are quasi-identical (except the Flash size) and they use both LTDC which is taken care of by CubeMX entirely.

Please do your changes in CubeMX, not in CubeMX within CubeIDE. It's something we haven't tested yet so we cannot assure you that it works correctly even though it should.

After doing that, download a simple app of just a box into your board, and tell me if it's working and you see the box on your screen.

This way, we can have a better understanding of your setup.

/Alexandre

AWies.1
Associate III

Thanks for your suggestion. I will try it as soon as I can. Right now I cannot do anything. I upgraded STMCubeIDE to version 1.4.0 (to see if this makes a difference), and since then I cannot debug any more. I can set up my ST-LINK as the debug probe, I can upgrade the firmware of the ST-LINK to the latest version using STMCubeIDE 1.4.0, but when I try to start a debug session, I window pops up "ST-LINK firmware verification" "No ST_LINK detected! Please connect ST-LINK and restart the debug session". Evidently ST broke something when releasing version 1.4.0. Brilliant. I think I need to de-install 1.4.0 and go back to a 1.3.x version.

Alex

MM..1
Chief II

Hi steps to activate touchgfx is more or less complicated. When you have project with framebuffer with single layer and it works, touchgfx need hal initialization to set same framebuffer adress and maybe double buffering... Every version CubeMX from 5.3 to 6.0 have different way to do working project...

AWies.1
Associate III

Update: I just lost a day on STM32CubeIDE Version 1.4.0. Not only the ST-LINK does not work any more, but to make matters worse, the CubeMX deleted the entire project when "updating" the code. After the "generating" the code the project directory was completely empty and the project removed from the IDE workspace. Fortunately I made a backup just before I upgraded to version 1.4.0, otherwise all my work would have been lost. I de-installed and re-installed the entire environment, but the behavior still remained the same; ST-LINK not functioning and CubeMX deletes the code. I have no idea what is going on here, but something is terribly wrong with 1.4.0. So I re-installed 1.3.0, and now the ST-LINK is back and CubeMX behaves in the expected manner. Nevertheless, for one week now I am treading water. I should be working on my code, but I am still struggling with getting anything on the screen. I know that the SDRAM and the LTDC are working properly, because I can write to the frame buffer using my own code. Works. Only when I use TouchGFX, nothing is ever displayed. Therefore a couple of questions:

  1. Is there some data which can be polled from the TouchGFX library, which tells me if an error occurred and what the status of the rendering task is? I am looking for a status variable or an error code. I could not find anything in the documentation.
  2. What are the prerequisites for TouchGFX. Does the STM32 have to be configured in a certain way, meaning clock frequencies, cache on or off, timers available, anything? I am looking for settings, which go beyond the LTDC configuration, because there I already know that it works. Also here the documentation is silent.
  3. What is the correct configuration for FreeRTOS? I know the GUI task is created successfully (at least I am getting the handle), but what about stack and heap size? Any requirement on interrupt priorities, or other parameters which have to be set?
  4. What is the correct initialization sequence before the initialization of TouchGFX is called? It should be part of the generated code, but who knows...

I really wish there was a more extensive documentation, which answers all this questions.

Alex

Alexandre RENOUX
Principal

Hello,

Did you try what I suggested ?

We have not yet try any projects with the new version of CubeIDE so we don't know if it works. So yes please stay with 1.3.0.

Also, did you make sure CRC was enabled in CubeMX ? If you take the Application Template of H750B-DK you will find everything that should be set (FreeRTOS, configurations in general).

Unfortunately, you cannot have debug info from the library.

/Alexandre

AWies.1
Associate III

I was in the middle of doing that when I had the idea of trying of 1.4.0 behaves different. Big mistake. Hopefully I can continue on this today once my environment is fully restored after the 1.4.0 disaster.

Alex

I made the same mistake. I can confirm after IDE and TouchGFX update nothign is drawn on screen anymore. I don't know which one is the culprit.