Skip to main content
karsparskambala
Associate II
October 11, 2024
Solved

TouchFX Zephyr Integration Font Issue

  • October 11, 2024
  • 6 replies
  • 3507 views

Hi,

I am working on integrating TouchGFX into Zephyr and have made some progress. However, I am currently facing an issue where the text appears scattered and displayed strangely.

I have enabled DMA2D, and the font data is stored in external QSPI flash and loaded into external internal SRAM. My board is the STM32H750B-DK.

Any help or tips would be greatly appreciated. Could you possibly guess the reason by looking at the image? The texts are displayed better after I press the reset button following the initial flash

karsparskambala_0-1728667263867.png

karsparskambala_1-1728667310453.png

karsparskambala_3-1728667357637.png

 

 

Best answer by MM..1

Try disable DCACHE

6 replies

MM..1
Chief III
October 11, 2024

Based on your font size place it into internal RAM not ext SDRAM.

karsparskambala
Associate II
October 11, 2024

Hi MM..1. Thanks for the answer.

   
I placed the FontFlashSection in internal RAM, but it did not affect the output. Below is the corresponding part of the linker script.
 
_LMA_FontFlashSection = LOADADDR(FontFlashSection); 
SECTION_PROLOGUE(FontFlashSection,,)
{
    . = ALIGN(0x4);
    _VMA_FontFlashSection_Start = .;   
    *(FontFlashSection FontFlashSection.*)
    *(.gnu.linkonce.r.*)
    . = ALIGN(0x4);
    _VMA_FontFlashSection_End = .;
} >RAM AT>FLASH

 

MM..1
Chief III
October 11, 2024

RAM AT FLASH is waste of ... if FLASH is internal FLASH.

How size is this section?

karsparskambala
Associate II
October 11, 2024

_VMA_FontFlashSection_End - _VMA_FontFlashSection_Start = 1504 Bytes

MM..1
Chief III
October 11, 2024

Ok small font then for testing store it in normal internal flash. As described in other thread memory for fonts must be byte addressable. 

karsparskambala
Associate II
October 11, 2024

Thank you again for your response.

The FLASH in question is the QSPI flash. For clarification, the location where the FontFlashSection is flashed is not related to the solution for the problem I am experiencing, correct? Ultimately, it will be loaded into internal RAM. I load it into SRAM1, which is byte-addressable.

Another question: What are TouchGFX_ScratchbufferA and TouchGFX_ScratchbufferB, and where should they be placed?

MM..1
Chief III
October 12, 2024

I see this scratch first time , but maybe for special for example QRcode require it...

karsparskambala
Associate II
October 14, 2024

Thank you very much for the answers

Hi Gaetan,

This is the text config:

karsparskambala_0-1728915240518.png

I have tried different font sizes (and a different font from Verdana: Times New Roman). Still the same.

karsparskambala_1-1728916003415.png

 

MM..1
MM..1Best answer
Chief III
October 15, 2024

Try disable DCACHE

karsparskambala
Associate II
October 15, 2024

Yes, that's it! Thank you very much! After disabling the DCACHE, the font issue is solved. Does this mean that all TouchGFX applications with text disable the DCACHE?

GaetanGodart
Technical Moderator
October 21, 2024

Hello @karsparskambala ,

 

You can use DCache with TouchGFX (with every RTOS), I don't know why it did not work this time.
My best guess would be that the MPU (memory protection unit) was not configured properly.

GaetanGodart_0-1729500597771.png

 

 

Regards,