cancel
Showing results for 
Search instead for 
Did you mean: 

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

AShah.9
Associate II

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).

1 ACCEPTED SOLUTION

Accepted Solutions
sss343
Associate II

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.

View solution in original post

4 REPLIES 4
Yoann KLEIN
ST Employee

Hello @Community member​,

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

Thanks,

/Yoann

Yoann KLEIN
ST Software Developer | TouchGFX

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.

Hi Ashah

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

Regs

sss343
Associate II

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.