Skip to main content

Additional Features

The Additional Features group appears if any additional features are available in the project configuration.

TouchGFX Generator Additional Features settings

External Data Reader

For the RGB565 Framebuffer Pixel Format, TouchGFX supports a Data Reader interface that allows developers to read data directly from a non-memory-mapped serial flash instead of caching which comes at the cost of an additional buffer in memory. Please see the SerialFlash article for a example on how to implement a DataReader to retrieve application assets from a non-memory mapped flash chip.

The Data Reader option is typically used for low cost solutions (e.g. STM32G0) that do not have enough memory for additional buffers.

The following configurations can be made by the developer:

  • External Data Reader: Enable or Disable the feature. Enabling will cause TouchGFX to retrieve data for assets directly through the generated interface. If disabled, developers are then required to cache images to a buffer in memory instead.
  • External Data Reader: Memory base address: Specifies the start address of the external data reader memory.
  • External Data Reader: Memory size: Specifies the size of the external data reader memory.
  • External Data Reader: Line Buffer Size: Creates two buffers for blending images or text into the framebuffer. Default value is : one screen width * 4 bytes, to support full size images in ARGB8888 pixel format.
  • External Data Reader: Minimum DMA transfer size: Set minimum required bytes to start a DMA transfer. If fewer bytes are requested, DMA will not be used.

After generating code with External Data Reader enabled, the following additional files are created by TouchGFX Generator to support the retrieval of assets directly from a non-memory mapped flash.

  • TouchGFX/target/generated/TouchGFXGeneratedDataReader.cpp
  • TouchGFX/target/generated/TouchGFXGeneratedDataReader.hpp
  • TouchGFX/target/TouchGFXDataReader.cpp
  • TouchGFX/target/TouchGFXDataReader.hpp

As usual for the AL architecture generated by TouchGFX Generator, TouchGFXGeneratedDataReader is read-only and user modifications should be made inside the TouchGFXDataReader class. TouchGFXGeneratedDataReader is of type touchgfx::FlashDataReader.

Modifications will be made to the following files to configure TouchGFX HAL, in order to use the DataReader.

  • TouchGFX/target/generated/TouchGFXConfiguration.cpp
  • TouchGFX/target/generated/TouchGFXGeneratedHAL.cpp
  • TouchGFX/target/generated/TouchGFXGeneratedHAL.hpp
Note
The DataReader Additional Feature is only available if DMA2D and LTDC are disabled.

Vector Rendering

To be able to configure Vector Rendering in TouchGFX Generator, the framebuffer pixel format must be RGB565 or RGB888. The developer has two options when it comes to Vector Rendering capabilities:

  • Enabled - Enables Vector Rendering support for the application. Required if the SVGImage widget is used in TouchGFX Designer.
  • Disabled - Disables Vector Rendering support for the application.
Caution
Check that Vector Rendering is set to enabled in TouchGFX Generator if you want to use the SVGImage widget from TouchGFX Designer in your application. Otherwise, you will get a "no definition for touchgfx::VectorRenderer::getInstance()" error during compilation.
Tip
If your device has GPU2D (NeoChrom) available (e.g. STM32U599), you can enable it for optimal vector rendering performance.
Further reading
See the SVG article for more information on how SVGs are rendered in TouchGFX.

8bit LTDC Color Look-up Table

When the LTDC is configured to read the framebuffer in L8 format and TouchGFX renders in either ABRG2222, ARGB222, BGRA2222, or RGBA2222, TouchGFX Generator will provide a CLUT which is loaded into the LTDC during TouchGFXHAL::initialize(). Please refer to the STM32 MCU reference manual for more details on usage of LTDC and CLUT.