2021-06-08 06:59 AM
It's been two months of endless trials (with 1 week break in the middle) to start TouchGFX on STM32F469-Discovery MB1189B board. So far, my latest project is called STM32F469TRY22, to give some idea. None of them work as intended. Not even one and not even once.
I've run into several problems during development:
1) Lack of proper documentation - for example, I have no idea what exactly screen I have, although I suspect it's OTM8009A, because function NT35510_Init doesn't produce anything at all. (I eventually founs the datasheet for the screen in the depths of the internet, I think, but it's not much help at this point)
2) Broken BSP drivers - they simply don't work out of the box without changing them - I mean display-related specifically, SDRAM part works OK with BSP or manually setup, and in order to change the broken BSP drivers, well, see problem 1. I tried to adjust them and got some progress - no image turned into poor unstable image with various problems. Definitely a progress. But not what it's supposed to be.
3) Sometimes I get picture, but touchgfx runs at 1/4 speed with violent display flickering. Slo-mo with 10FPS, so 1s animation takes several seconds, while display is flickering.
Truth be told, I'm not even looking for advice on my code anymore, I asked twice here and on Electrical Engineering StackExchange and didn't make much progress. The only thing that runs OK on it is a pre-compiled binary, which, of course, I can't look into.
If anyone on this planet has a CubeIDE+TouchGFX project on STM32F469 with DSI screen that works without garbage on screen, screen tearing, flickering, 10FPS slo-mo, noisy pixel lines and/or random hanging, could you please send over the generated files/necessary files? I'm totally OK with a few BSP files, or without them. I mean, as long as it works, I'm so desperate I'll agree to anything that makes it work. I don't really know where else to ask for this, I know this is supposed to be a place for questions and answers, but nothing seems to work for me. Desperate times call for desperate measures.
2021-06-14 07:05 AM
Hi,
Digging this up after seing your other message, could you share what you are trying to do ? Did you modify the discovery kit or are you trying to port TouchGFX on it ? Did you use the application template for the STM32F469 disco board available in TouchGFX Designer as source of inspiration ?
Concerning the documentation I kind of agree as I often struggle as well :grinning_face_with_sweat: but if you are using a "normal" F469 disco the schematics are available on the ST official documentation page, under the "CAD Ressource" tab. The display seems to be the KM-040TMP-02-A so you are right the OTM8009A is the correct LCD driver.
/Romain
2021-06-14 07:26 AM
No, I didn't modify anything. I bought a discovery and wanted - and now finally working on - making a device with display.
As for documentation - I've found it all, but some bits and pieces of info are missing there - for example HSYNC/VSYNC values are not available even in OTM8009A datasheet (there are porches; and there are only parameters for 480x800, but not for 800x400, among other resolutions it supports; Datasheet has landscape and portrait resolutions independently, switching values between horizontal and vertical didn't work - there is nothing I didn't try I think), which you have to find pirated in the internet (and there are two versions of it - one's half-finished).
I'm not the dumbest guy in the area (sure hope so) and I pick things up quickly, and I'm not afraid of stuff I don't know as long as there is stuff to read/watch, rarely ask. I haven't had a single STM32 project at all (blue pill on arduino ide doesn't count of course). I did play a little with PIC microcontrollers - set up I2C by manipulating registers directly. I became proud of it but decided I want to stay sane. And I wanted some more up-to-date architecture. So I switched to STM32. I think I had no problem with basic STM32 operation from day 1 - GPIO, I2C stuff. It's the display part that was difficult. I've watched many lectures on how stuff works, everything made sense for me. It was a lot of info, but it wasn't all difficult in principle. It's just much.
Most examples - all of them actually - work with 746 Disco. Literally EVERY tutorial has 746. I searched in several languages, and it's only 746 everywhere. And I already had 469 because I needed that extra resolution. I wanted to make it show a picture that I'd expect so that I could start working on PCB. I won't start it until I know I can actually make it work in software. So my adventures began.
Following 746 tutorials/examples, I set up hardware in cube, LTDC, DMA2D, FMC, added DSI, FreeRTOS, then I added TouchGFX through Cube. With 746, I had working TouchGFX in 2 hours. On 469...it didn't work. Still don't know why exactly, sometimes I even had hardware faults when debugging. Of course I kept in mind I have another MCU and hardware, I accounted for it. Tried with BSP drivers (corresponding to MCU/Disco board of course) - SDRAM initiated OK, the display - various, but incorrect results. The best I got was working TouchGFX with smth like 10FPS with Slo-Mo - 1s animation takes like 4s or something. But hey, at least there were no artifacts. Can't say much more, it's been 2 months of almost DAILY attempts - with a week sanity breaks. I tried everything I could imagine and even some things I could not imagine.
After hours of lectures, examples, questions, kilometers of forum threads, I accidentally found out I can actually start the project from TouchGFX, and I can actually have some working code there that initializes everything. So I eventually arrived at the solution yesterday. Integrating TouchGFX project into Cube isn't easy and seamless tho, which is a shame, but I did it eventually. Now I can develop further and I can read the "correct" working code.
2021-06-15 04:59 AM
Not sure if this is what you are asking, but TouchGFX Designer can generate projects for CubeIDE, Keil, IAR. You can simply select the F469-DISCO board from the list, select the example UI, and generate a working project. That's the quickiest path to make UI on your discovery.
Also I have working TouchGFX project for F469-DISCO generated with CubeMX, let me know if you need it too.
Have you tried STM32F4-repository examples for that board, do they work? Maybe something wrong with hardware.
2021-06-15 05:05 AM
Yep, I have already figured it out. Although importing from TouchGFX to CubeIDE required some magic (replacing certain strings in project and cproject file etc to make project name custom and not 469-I disco).
If you have a project on 469 that you started on CubeMX and then added TouchGFX and it works correctly - something I managed in 2 hours on 746 and didn't manage in 2 months on 469 - I ABSOLUTELY WANT TO SEE THAT!
2021-06-15 05:36 AM
Just sent you to "messages". The code is a little messy - no time to fix that. Based on a project created by TGFX. If I remember correctly, the display in the examples was updated in 4 parts, I didn't do that.
2022-01-06 07:33 PM
Dear @VLau
Could you kindly do me a favor and share the project with me as well.
Because I have tried several times to start a project with my STM32F469 discovery board and I was not successful. Even I tried to work with Embedded Wizard which I don't think would be popular among engineers.
I'll be so grateful if you help me.
Thanks
Mas
2022-01-07 01:29 AM
I was still having issues with the thing until recently. Here is another thread of mine where I eventually got the problem resolved: