2020-07-24 02:34 PM
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?
Solved! Go to Solution.
2020-07-27 01:53 AM
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
2020-07-27 01:53 AM
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
2020-07-27 05:06 PM
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
2020-07-28 06:09 AM
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
2020-07-28 10:58 AM
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
2020-07-28 11:16 AM
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...
2020-07-28 07:48 PM
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:
I really wish there was a more extensive documentation, which answers all this questions.
Alex
2020-07-29 01:10 AM
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
2020-07-29 08:35 AM
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
2020-07-29 09:06 AM
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.