2021-07-26 08:15 AM
I am using Touchgfx v4.16. I recently purchased a STM32429I-Eval kit directly from ST. I ported an existing Touchgfx project to use the 429I-Eval drivers and flashed the board using the Stm32 Cube Programmer and the external flash loader that matches the eval board's external flash. When the application started, the image on the screen was distorted.
As a check, I generated an example project using Designer. I flashed the project onto the eval board directly using Designer. The screen image was still distorted (see attached image).
When I load the original demonstration application onto eval board, the images look fine. However this is a single STemWin binary and not separate internal and external binaries.
The only times when I seen this sort of image distortion is when there is a mismatch between the internal and external binaries (ex: the external binary is updated on the target but the internal binary is not).
Is there a known issue with the STM32429I-Eval board or the files that come with its examples in TouchGfx Designer? Is there something that I could be overlooking?
Thanks.
Solved! Go to Solution.
2021-08-02 10:57 AM
Ok, I think I have some understanding of the issues I have encountered. I am going to summarize here in case these notes can help someone else.
I started with a TGX project for the F469 Discovery board. I created that project by generating a blank project from TGX Designer, v4.16. I later decided to port this project to the F429 Evaluation board because the screen was more representative of what I would be using in the future. I followed the same process of creating a blank project with Designer. I then copied over my UI files into that project and flashed my target. The image on the screen was pixilated with weird artifacts.
In trying to understand what was going on, I tried generating an example F429 eval application with TGX Designer. I built and flashed the eval board and got the same type of screen distortion. Eventually I realized that the linker file created by Designer has a section that put a section called ExtFlashSection into the external flash. The example I picked does not use this section. If I comment out this part of the linker (and anything put into external flash), the images on the UI look good.
I returned to my original issue of the 469 disco to 429 eval port. Previously I found that the 429 Eval TGX example project generated by Cube ran fine on my board. Looking back at this code I realized that it was using TouchGfx v4.10 and the project had 429 Eval BSP driver files. The TGX generated project does not use those BSP files. I replaced the UI files in the Cube generated project with my own and replaced the v4.10 TGX library with the v4.16 library. I had to make a small change in BoardConfiguration.cpp but after that the project built. On my target the images look good - no more distortion.
Basically my conclusion is that there is some difference in the settings in the auto-generated drivers between TGX Designer and Cube. I have not gone through everything to find out exactly what the differences are. The project structures are very different and the TGX generated code uses a lot of magic numbers whereas the Cube code uses a lot of #defines so going through and making comparisons will take some time.
2021-07-26 08:30 AM
TouchGFX was recently updated to v4.17. Download and test with the latest toolchain. Suggest to start with the Designer and test with the simulator and then apply onto the flash of your kit. Confirm that this process works before changing any of the wizard generated code.
2021-07-26 02:16 PM
I tried the v4.17 framework. The simulation works fine but running on the hardware has the same issues - random pixels are missing or wrong color and lines of pixels are missing. I am uploading a new screenshot because it shows the missing lines of pixels better. (The white dot in the lower left is part of the application.)
2021-07-27 07:59 AM
Try:
1) to upload another pre-compiled demo for this target kit. Does the pre-compiled demo work properly on the LCD ? You should be able to download the factory demo that was shipped with the kit and apply. Just to confirm that the hardware is stable.
2) Upload the binary file that you believe should be working and will hunt down the same kit - it is somewhere in the lab to see if we see the same results on our hardware.
2021-07-27 10:41 AM
Ok. I took a big step back and repeated a some of the things I tried initially and tried some new things.
So from this I can say: 1) The hardware is good. 2) The external flash loader is good.
I noticed that the LED pattern for the pixilated application and the non-pixilated application were very different. This makes me wonder about the generated hardware settings in each application.
2021-07-28 09:25 AM
Another bit of a clue. I imported the demo project that was generated by TouchGfx design into Cube IDE (File->Import->Projects from folder or archive). I built the project in Cube IDE as-is and flashed the *.elf file. No pixilation on the screen. This is telling me that the generated hardware settings are good. When this project is built through Designer or the TGX environment, I get the pixilation.
I am attaching the two *.elf files. The elf file generated by the TouchGfx makefile is much smaller than the elf generated by the IDE (1.3 MB vs. 2.7 MB). Both builds are using the same linker file so I am down to looking through the two different makefiles to see if there is something there.
2021-08-02 10:57 AM
Ok, I think I have some understanding of the issues I have encountered. I am going to summarize here in case these notes can help someone else.
I started with a TGX project for the F469 Discovery board. I created that project by generating a blank project from TGX Designer, v4.16. I later decided to port this project to the F429 Evaluation board because the screen was more representative of what I would be using in the future. I followed the same process of creating a blank project with Designer. I then copied over my UI files into that project and flashed my target. The image on the screen was pixilated with weird artifacts.
In trying to understand what was going on, I tried generating an example F429 eval application with TGX Designer. I built and flashed the eval board and got the same type of screen distortion. Eventually I realized that the linker file created by Designer has a section that put a section called ExtFlashSection into the external flash. The example I picked does not use this section. If I comment out this part of the linker (and anything put into external flash), the images on the UI look good.
I returned to my original issue of the 469 disco to 429 eval port. Previously I found that the 429 Eval TGX example project generated by Cube ran fine on my board. Looking back at this code I realized that it was using TouchGfx v4.10 and the project had 429 Eval BSP driver files. The TGX generated project does not use those BSP files. I replaced the UI files in the Cube generated project with my own and replaced the v4.10 TGX library with the v4.16 library. I had to make a small change in BoardConfiguration.cpp but after that the project built. On my target the images look good - no more distortion.
Basically my conclusion is that there is some difference in the settings in the auto-generated drivers between TGX Designer and Cube. I have not gone through everything to find out exactly what the differences are. The project structures are very different and the TGX generated code uses a lot of magic numbers whereas the Cube code uses a lot of #defines so going through and making comparisons will take some time.