TouchGFX – platform for STM32 from STMicroelectronics


TouchGFX is an advanced, free graphics software platform optimized for STMicroelectronics STM32 microcontrollers. Leveraging graphics functionality and the powerful STM32 architecture, TouchGFX accelerates the HMI-of-things revolution by creating powerful, graphical user interfaces similar to smartphones. The TouchGFX package includes TouchGFXDesigner and TouchGFX Engine and TouchGFX Generator, a plugin to STM32CubeMX which is a configurator and generator of a TouchGFX Abstraction layer. TouchGFXDesigner is an easy-to-use graphics creation tool based on dragging and dropping graphics components, while TouchGFX Engine is a powerful and optimized graphics engine. TouchGFX makes GUI development easy by combining a WYSIWYG simulator and automatic code generation. It covers everything from early design sketches to exclusive final products through rapid iterations of finished prototypes.

TouchGFX Designer is available as a standalone software for easy and fast graphics application development and proof of concept. The TouchGFX package is available in the STM32Cube collection. It is fully compatible with the STM32CubeMX initialization and code generation tool and works with a variety of software writing tool providers including the free STM32CubeIDE tool.

Key features:
  • Structure: easily create content for multiple screens and interactions between them.
  • Widgets: a wide selection of customizable widgets, such as a sliding container or progress indicator, for easy GUI creation.
  • Skins: a set of ready-to-use graphical “skins” allowing consistent prototyping without the need for a graphic designer, no restrictions on the use of custom graphics.
  • Interactions: dynamic interactions to create intuitive interfaces.
  • Custom Containers: easily create a platform with a unified look and feel.
  • Text handling:
    • Fonts specified and managed in one place,
    • Full translation support,
    • Full support for multiple alphabets and scripts such as Latin, Cyrillic, Arabic, Chinese and Japanese.
  • Code generation:
    • TouchGFXDesigner automatically generates C++ code,
    • The code generated by TouchGFXDesigner is completely separate from the user code,
    • All types of code extensions possible for unique animations, as well as interconnection between systems,
    • Support for several integrated development environments, such as IAR Embedded Workbench, Arm Keil and GCC-based STM32CubeIDE.

The TouchGFX platform in combination with STM32 microcontrollers allows to work with displays with resolutions up to 1024×768 (sizes up to about 10-12′) with various interfaces such as serial SPI, parallel I8080, 24-bit RGB and MIPI.

MCU resources required to run TouchGFX
  • CPU: 1-90% depending on application and hardware gas pedals.
  • Operating system: not necessary or any RTOS supported by STM32: FreeRTOS, Azure ThreadX TROS.
  • RAM:
    • Framework and stack 10-30kB,
    • Widgets: 1-15kB,
    • Framebuffer: 10kB-3MB depending on screen resolution, color depth and number of framebuffers.
  • FLASH memory:
    • Framework: 60-100kB,
    • Screen definitions, GUI, logic: 1-100kB,
    • Images and fonts: 1-40MB depending on application development.
“Low cost” graphics applications

Graphics applications do not always have to mean expensive and powerful hardware. The TouchGFX platform allows you to design attractive graphical interfaces even already based on low-cost STM32G0 MCUs clocked at 64Mhz and color graphic displays with SPI interface.

Below is a sample configuration:

  • MCU: STM32G071RBT6:
    • MCU RAM 36 kB,
    • MCU Flash 128 kB.
  • Screen: PH320480T009-LAA01:
    • Size: 3.5″,
    • Resolution: 320 x 480,
    • Controller: ST7796S-G5,
    • Interface: SPI 32MHz.
  • NOR Flash: Amic A25LQ64M-F/G:
    • Type: NOR Flash,
    • Size: 64 Mbit,
    • Interface: SPI 32MHz.

The display is connected to SPI1 while the FLASH memory is connected to SPI2 which allows the MCU to read data from the memory and send data to the display at the same time.

TouchGFX hardware limitations
  • Image refresh – resolution is 320×480 which gives 153,600 pixels or in other words 307,200 Bytes. Data transfer between MCU and display is 32MHz which gives 4MB/s or 2MPixels/s

Assuming the refresh rate of 76 times per second in one frame we can transfer 2 000 000 pixels divided by 76 which gives 26 280 pixels (17% of the whole screen). Realistically, it will be about 15% of the complete screen to be displayed. In this case, we need to optimize the screen area to be refreshed in order for the image on the display to be smooth.

  • Drawing speed – pay attention to the format of the image stored in the SPI FLASH memory in order to keep up with transferring data from the memory to the display – maximum RGB565.
TouchGFX software limitations
  • Texture Mapper, Animation Texture Mapper, Scalable Image – these widgets are disabled by default for STM32G0 due to the necessary resources for operation. There is a possibility to enable them manually, but keep in mind the hardware limitations, not every STM32G0 project with graphic display will be able to run them.
  • Bitmap Painter (Line, Circle, Dynamic Graph) – similar to the above, these widgets need internal FLASH or RAM memory to work properly and are disabled by default for STM32G0,
  • L8 format – this format can be used as long as the built-in FLASH memory is used

Read more: click here

Displays in Masters offer

Masters offers displays appropriately matched to the type of STM32 microcontroller and the capabilities of the TouchGFX environment. We will use Powertip Technology Corp. (a leading Taiwanese manufacturer of LCD displays), whose wide portfolio, apart from standard, popular monochrome signage, graphics and TFT displays, includes also displays with wide viewing angles, so called full viewing angle (FVA). There are many available display sizes ranging from 2″ to 10.1″. All of them can include capacitive touch panel and some versions like 3.5″, 4.3″, 7″ are also available with extended operating temperature. We can also choose from many available control interfaces i.e. serial SPI, parallel I8080, 24-bit RGB, MIPI-DSI, LVDS, HDMI.

Touch panels can be modified on special request. Customization includes changing dimensions, adding a customer logo in a chosen color or choosing the color of the whole touch panel to match the color of the device’s casing in which the display with panel will work.


More info:

New features that make working with Text and Graphs a breeze 



X-Cube display


STM32 Graphical User Interface

Dedicated info about STM32G0:

Dedicated website about STM32G0

STM32G0 series

Masters is the official distributor of STMicroelectronics products. If you are interested in receiving samples or want to talk about your project and possibilities of using STMicroelectronics components, please contact us at or directly with chosen Customer Service Office. We will advise the most appropriate solution to your needs.