cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX 4.25.0 - Visual Glitches with Fonts/Texts Stored in External NOR Flash

uilter
Senior

Hello everyone,

I'm experiencing an issue with TouchGFX 4.25.0 on a custom STM32H7-based board that we develop and sell as an OEM product, and I'm hoping someone can help me understand what might be causing it.

Problem Description

When fonts and texts are configured to be stored in the external NOR Flash memory, we observe undesirable visual glitches and artifacts, particularly affecting text rendering. However, when the same fonts and texts are kept in the internal Flash, everything renders correctly without any issues.

Current Workaround

To avoid the problem, I've modified the linker script to force FontFlashSection and TextFlashSection into internal Flash, while only ExtFlashSection (for images/assets) goes to external NOR Flash:

 
/* TOUCHGFX Begin *********************************/
FontFlashSection :
{
    *(FontFlashSection FontFlashSection.*)
    *(.gnu.linkonce.r.*)
    . = ALIGN(0x4);
} >FLASH

TextFlashSection :
{
    *(TextFlashSection TextFlashSection.*)
    *(.gnu.linkonce.r.*)
    . = ALIGN(0x4);
} >FLASH

ExtFlashSection :
{
    *(ExtFlashSection ExtFlashSection.*)
    *(.gnu.linkonce.r.*)
    . = ALIGN(0x4);
} >NOR_FLASH
/* TOUCHGFX End ***********************************/

When I change FontFlashSection and TextFlashSection to >NOR_FLASH, the visual glitches appear.

Why This Is a Problem

While this workaround is functional, fonts and texts can consume a significant amount of internal Flash memory, which becomes problematic in projects with limited internal Flash availability or when we need that space for application code.

Environment

  • TouchGFX Version: 4.25.0
  • MCU: STM32H753BIT6
  • External SDRAM
  • External Memory: NOR Flash (memory-mapped via QSPI/OSPI)
  • Note: This same behavior has occurred in other projects as well, so it doesn't seem to be isolated to this specific board.

Questions

  1. Has anyone else experienced similar issues with fonts/texts stored in external flash?
  2. Are there any known timing, caching, or memory-mapped configuration considerations that could cause this behavior specifically for font data?
  3. Is there any additional debugging or diagnostic information I could gather to help identify the root cause?

I'd really appreciate any insights or suggestions. If there's any additional information I can share to help investigate this issue (memory configuration, screenshots of the glitches, HAL/clock settings, etc.), please let me know and I'll be happy to provide it.

Thank you in advance for your help!

12 REPLIES 12

@mƎALLEm sorry about the delay.

Unfortunately, the MPU background region change did not fix the issue.

This problem is quite difficult to reproduce , it occurs randomly and intermittently. Yesterday I was finally able to capture it again, so I'm attaching 3 videos that demonstrate the behavior.

Observations:

  • Only the text rendering is affected, changing randomly/unexpectedly
  • The screens and containers do not overuse invalidate() or any forced redraw logic
  • When I move the fonts and texts to internal Flash, the problem disappears completely

This strongly suggests the issue is related to how data is being read from the external NOR Flash, but I'm unsure what else could be causing it given that the MPU is now properly configured.

Is there anything else I should investigate?
Thank you.

Osman SOYKURT
ST Employee

Hello @uilter ,

Maybe it's not related but what is the font that you're using? Is it bitmap font that you're using or vector? also, which bpp for your typography? 

Osman SOYKURT
ST Software Developer | TouchGFX

Hi @Osman SOYKURT , thanks for your message!

For this particular project we have 12 different typographies, bitmap and all use Bpp = 4.
All texts we use an specifique font called Inter.

uilter_0-1769045868752.png