Skip to main content
AShah.9
Associate
May 26, 2023
Solved

I am using TouchGFX 4.20.0 library and sometime getting garbled text on screen while transitioned to different screen

  • May 26, 2023
  • 3 replies
  • 1957 views

I am using TouchGFX 4.20.0 library. We are storing all the Fonts and images to the external memory. During the initialization as per the selected language we are caching the respected Fonts and successfully load the fonts and able to see correct text. We also cache all the images upfront. But while our display module is receiving large number of CAN messages on the CAN task sometimes we observed the few texts on the screen becomes garbled. The issue comes only for text we did not see any issue while drawing the images. As we cache both the fonts and images upfront during the initialization though we are seeing the issue with text(fonts).

This topic has been closed for replies.
Best answer by sss343

To address the issue of garbled text in your TouchGFX application:

  1. Check for memory corruption or overflows in font and text buffers.
  2. Review your CAN message handling code for memory leaks or overflows.
  3. Ensure robust resource caching and concurrent access handling.
  4. Verify synchronization between tasks if your application is multi-threaded.
  5. Monitor memory fragmentation in external memory usage.
  6. Implement error logging and debugging mechanisms.
  7. Consider updating to the latest TouchGFX version.
  8. Use memory profiling tools to analyze memory usage.
  9. Be aware of hardware limitations that may affect text rendering.
  10. Test and simulate the issue in a controlled environment.
  11. Seek assistance from the TouchGFX community or support resources if needed.

3 replies

Yoann KLEIN
ST Employee
June 13, 2023

Hello @Community member​,

Could you provide a picture/screenshot of this problem please ?

Thanks,

/Yoann

Yoann KLEINST Software Developer | TouchGFX
AShah.9
AShah.9Author
Associate
June 21, 2023

Hi, we have found the root cause of this issue. It was regarding the common memory operation used by both firmware upgrade process and Touchgfx process. As we are using unmapped fonts storing it in external memory the data reader used by touchgfx task perform memory read operation to get font data at the same time firmware upgrade task use memory write operation. To resolved this issue we implement Mutex to avoid multiple task using same utility.

Flemming Gram CHRISTENSEN
ST Employee
June 29, 2023

Hi Ashah

Nice. Do you think we should add something in the documentation?

Regs

sss343Best answer
Associate
September 26, 2023

To address the issue of garbled text in your TouchGFX application:

  1. Check for memory corruption or overflows in font and text buffers.
  2. Review your CAN message handling code for memory leaks or overflows.
  3. Ensure robust resource caching and concurrent access handling.
  4. Verify synchronization between tasks if your application is multi-threaded.
  5. Monitor memory fragmentation in external memory usage.
  6. Implement error logging and debugging mechanisms.
  7. Consider updating to the latest TouchGFX version.
  8. Use memory profiling tools to analyze memory usage.
  9. Be aware of hardware limitations that may affect text rendering.
  10. Test and simulate the issue in a controlled environment.
  11. Seek assistance from the TouchGFX community or support resources if needed.