cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX option stays disabled in STM32CubeIDE v1.1.0

gps
Associate II

I am creating a custom board project for STM32F769 in STM32CubeIDE v1.1.0 with TouchGFX support.

Even after enabling CRC, LTDC, DMA2D, RCC, I couldn't get the TouchGFX option highlighted.

I tried setting up QuadSPI and FMC SDRAM2 as per online tutorials, but still the same.

I could create projects directly in TouchGFX but dependent on Eval or Discovery kits. What I want is to create a project from scratch with only the required peripherals with TouchGFX support either from CubeIDE or CubeMX, both of which are not working as of now.

It seems the TouchGFX integration for F7 and H7 CPUs are not complete because if I select F469 as the CPU, TouchGFX option is available to be selected with settings to link TouchGFX exe and execute from within the CubeIDE.

4 REPLIES 4
gps
Associate II

Have been digging a lot across various examples, code generation from CubeMX, CubeIDE, TouchGFX, video tutorials and alike.

Somehow got the TouchGFX enabled with correct LTDC, DSIHOST, DMA2D, Tim1, Tim6, FreeRTOS, CRC, FMC, SDRAM1, QSPI, Linker Script updates, Clock Speeds all setup correctly to match the requirements.

Got the LCD up and running with UI created from TouchGFX, BUT...

  1. Updating UI in TouchGFX won't update when code is run again.
  2. Repeatedly debugging code stucks the UI with some part of diplay either showing 2nd screen or multiples of same screen
  3. Found that the MX_DMA_Init() is never called eventhough it sets the LTDC DMA configurations
  4. Setting up Image X and Window X values as shown in ToughGFX example for F779i-Eval kit, but image clips into 2 which is actually right as the width for X is halved
  5. MX_DSI_Init() requires reconfiguration with enabling low power commands, initializing the display and then turning On the display. Looks like, CubeIDE and TouchGFX integration for F779 CPU is incomplete. Code generated is not invoking the required functions and also default settings in IOC tool stays disabled or all Zeros eventhough a Board is selected as a startup project.

I have been struggling a lot with getting the touchGFX to work nicely with CubeIDE OR CubeMX OR STW4STM32, but none of them works for F779 CPU. I cannot go to F746 CPU as the LCD I am targetting is MIPI-DSI wiht 720x1280 pixels 5". for F746 CPU, interface is LTDC RGB which seems much easier but I am not looking for over 30 pin high speed routing for RGB interface.

Does anyone have an idea what I am doing wrong or is the support for F779I CPU is not ready yet as it hosts LTDC MIPI-DSI which requires some additional timing and configurations?

Martin KJELDSEN
Chief III

CubeMX/CubeIDE integration with TouchGFX saw some minor improvements with the release of CubeMX 5.4 and CubeIDE 1.1.0, but the underlying problem of being difficult to configure because of IP restrictions (DMA2D, LTDC/DSI, SDRAM, QSPI, etc) remain. There are too many restrictions currently which means people cannot use CubeMX to create touchgfx projects for custom boards (With no LTDC, no qspi, for instance).

  

If you take the F769i-DISCO application template from the designer you'll have an ioc file that's configured to enable TouchGFX.

/Martin

gps
Associate II

After few days of debugging and patching, finally got the STM32CubeIDE v1.1.0 and TouchGFX v4.12.3 working on STM32F779i-Eval Kit with 4" MIPI DSI LCD.

I was able to use CubeIDE IOC configurator to setup the paramters for all the required peripherals and got a small 2 screen application working fine.

I tested the application by creating 2 screens with different colors and 2 dummy buttons just to see if the screens switch on a predefined timeout and it works.. Hurray....

But,

  1. Touchscreen generates Mem Handler faults. Disabling touch works. This is the next step to work on. For now disabling touch makes the application work without problems.
  2. Saving the assets in internal Flash of STM32 CPU, everything works fine.
  3. Saving assets in external QSPI Flash (N25Q512A) shows washed out colors as if RGBA values are swapped. It seems when the QSPI dumps data into framebuffer or transfer it via the memory mapped mode, it sends the data in wrong direction hence swapped bytes. Tried fixes at lot of places like QSPI_IRQ_Handler, STM32F7xx_DMA.cpp and STM32F7xx_DSI.cpp, but nothing solved the problem.

Has it been observed before that using a QSPI flash to store assets, inverts the data format and the LCD shows washed out colors.

For now, solving these bits of mysteries is creating a bit more confidence in getting a custom board working using CubeIDE and TGFX. Learning curve for TGFX is so small compared to the Embedded Wizard I used before, I am impressed with what TGFX can offer.

Martin KJELDSEN
Chief III

Hi @Community member​,

I'm filled with joy when you say:

  1. You've made something work on your own
  2. You enjoy TouchGFX

Good job. As to your issues:

  1. Not sure why the touch controller would mem fault. Did you debug any further on this?
  2. -
  3. This could be a faulty configuration. Can you verify in your framebuffer that rgb values are also wrong here? Try comparing your configuration with the configuration that we've done in the F769-DISCO application template from the designer.

/Martin