2025-03-17 4:58 PM - edited 2025-03-17 5:10 PM
Hi ST community!
We have a custom OEM product that using STM32H753ZIT6 with external SDRAM (parallel mode) and NOR Flash (QUADSPI mode) memories.
In this particular project we are facing some issues with the TEXTS, more specifically the rendering of the texts.
I attached a video to show this details.
The text alternates between the correct content and the '?' character. On some screens the frequency is higher between the content and the '?' character, but on others it can vary up to 1 second.
Normally when it happens means any special character was not defined properly at Touchgfx, but we double check it and everything is there.
When we change a text we always follow this sequence (just an example):
text.setWildCard(textBuffer);
text.resizeToCurrentText() or resizeToCurrentTextWithAlignment();
text.invalidate();
After this effect we try to erase all NOR FLASH to guarantee the content. Also after all download to NOR FLASH, is checked. But it not works or return error.
We also try to regenerate all touchgfx files (by the way we use the version 4.24.1). It didn't work either.
Today we change only the Fonts and Texts to internal FLASH memory from STM32. After this move, everthing is running well and we don't have those effects. We just edit the linked file, something like this:
/* 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 ***********************************/
From this point on I assume it is a tweak that is hiding some problem, which has not yet been resolved.
The "solution" is not acceptable because it cost too much internal FLASH program.
Some one can guide us to discover what's going on here?
Many thanks!
2025-03-18 3:18 AM - edited 2025-03-18 3:27 AM
Hello @uilter ,
Small thing here but if you resize the text area, you should also invalidate before resizing (because if it gets smaller there will be leftovers) like so:
text.invalidate();
text.setWildCard(textBuffer);
text.resizeToCurrentText() or resizeToCurrentTextWithAlignment();
text.invalidate();
I think the issue here comes from the use of setWildcard.
This post shows an example use of setWildcard.
When you have a textArea with a wildcard, that wildcard is a variable stored in memory and I think that setWildcard is just use to change the variable that refers to what you want to print (that is why you have to pass the address of UnicodeChar to setWildcard).
To actually change the wildcard, then you also have to use snprintf.
You also have to make sure that that new buffer assigned to your wildcard is not been erased otherwise, the data it contains (the one you want to display) is also gone.
I would still recommend you to use the wildcard buffer from TouchGFX Designer:
and then using snprintf to change that generated buffer.
So can you please try to use snprintf and tell me if this solves your issue?
(Or check where you put your "textBuffer".)
Regards,