Additional Features
The Additional Features group appears if any additional features are available in the project configuration.
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
Vector Rendering
To be able to configure Vector Rendering in TouchGFX Generator, the framebuffer pixel format must be RGB565, RGB888, or ARGB8888. The developer has three options when it comes to Vector Rendering capabilities:
- Disabled - Disables Vector Rendering support for the application.
- Software - Enables software Vector Rendering support for the application.
- Hardware - Enables hardware Vector Rendering support for the application.
When Software is chosen vector rendering is performed by the CPU. For MCUs with GPU2D (Neochrom) available, the Hardware option is available, which will improve the performance by doing the the vector operations in the GPU2D.
Caution
Tip
Further reading
Vector Font Rendering
To be able to enable Vector Font Rendering in TouchGFX Generator, Vector Rendering must be enabled (either software or hardware). The developer has two options when it comes to Vector Font Rendering capabilities:
- Disabled - Disables Vector Font Rendering support for the application.
- Enabled - Enables Vector Font Rendering support for the application.
The performance of the drawing of Vector Fonts is effected by the option for the Vector Rendering parameter (i.e. hardware being the fastest).
If Vector Font Rendering is enabled, users can choose the Vector format type for typographies in their applications. Otherwise, only the Bitmap format type is selectable.
Further reading
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.