cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to display Text using FreeRTOS, TouchGFX and Custom LCD

pitbull
Associate III

Hello Everyone,

Earlier we have successfully developed a variant using STM32F746 Discovery board but now we have shifted towards our own developed PCB with custom LCD Display 800 * 480.

Our new PCB uses MT25Q128A external flash for storing images, text and font used by TouchGFX and we are using single buffer allocation in external SDRAM for framebuffer. We are using different pins for QuadSPI communication so had to develop custom external loader for this. We have tested the external loader for various images and it works fine.

When we started inputting texts in TouchGFX the system would wait infinitely in xQueueSemaphoreTake() function so we suspected something might be wrong with loading from external flash so we created another project this time stored everything in internal flash, again the result was same, the TouchGFX hangs while using texts.

After searching through the community we came across following links:

https://community.st.com/t5/stm32-mcus-touchgfx-and-gui/ui-stuck-in-takeframebuffersemaphore/td-p/203677/page/7

Here it is suggested to  try to change the line in stm32h7xx_hal_dma2d.c, in the function, but is related to H7 series.

Same thread also suggested changing MPU Config

pitbull_0-1736834760700.png

 

We had disabled MPU in our project but even after enabling it the result was unaffected.

 

pitbull_1-1736834760419.png

 

Please guide me where I am doing wrong.

Thankyou 

 

Regards,

Pitbull

1 ACCEPTED SOLUTION

Accepted Solutions
pitbull
Associate III

Hii @MM..1

 

Finally resolved the issue.

Following is the link 

https://forums.freertos.org/t/how-to-debug-to-resolve-configassert-pxqueue-uxitemsize-0-loop-error/17269 

Increasing the stack size for the tasks resolved the issue in the following post.

Similarly I increased the stack size for every task from 128 words to 512 words.

Thankyou @MM..1  @JJhin.1 @Flemming Gram CHRISTENSEN  for your time and support.

 

Thankyou

 

Regards,

Pitbull 

View solution in original post

25 REPLIES 25
pitbull
Associate III

Hello Everyone,

Earlier we have successfully developed a variant using STM32F746 Discovery board but now we have shifted towards our own developed PCB with custom LCD Display 800 * 480.

Our new PCB uses MT25Q128A external flash for storing images, text and font used by TouchGFX and we are using single buffer allocation in external SDRAM for framebuffer. We are using different pins for QuadSPI communication so had to develop custom external loader for this. We have tested the external loader for various images and it works fine.

When we started inputting texts in TouchGFX the system would wait infinitely in xQueueSemaphoreTake() function so we suspected something might be wrong with loading from external flash so we created another project this time stored everything in internal flash, again the result was same, the TouchGFX hangs while using texts.

After searching through the community we came across following links:

https://community.st.com/t5/stm32-mcus-touchgfx-and-gui/ui-stuck-in-takeframebuffersemaphore/td-p/203677/page/7

Here it is suggested to  try to change the line in stm32h7xx_hal_dma2d.c, in the function, but is related to H7 series.

Same thread also suggested changing MPU Config

pitbull_0-1736832798007.png

We had disabled MPU in our project but even after enabling it the result was unaffected.

 

pitbull_1-1736832860313.png

Please guide me where I am doing wrong.

Thankyou 

 

Regards,

Pitbull

Hi.

The issue about MPU in the topic you refer to is to disable prefetching outside of the QSPI range.
This is important and should be done. Normally this gives an error after running a while (could be hours).

Try moving texts and fonts to internal flash for a test. This is done in the linker script.

Also check the DMA2D for errors. One error is the configuration error. There is maybe a handler for this in the top of TouchGFXGeneratedHAL.

It can also be a DMA2D Transfer error. This comes if there is a error on the memory subsystem during the transfers. 

You can check this by looking at the DMA2D registers (in the ISR register).

If you get this, you do not get the Transfer Complete interrupt, and the process stops.

Hope it helps.

Hii Fleming,

 

Already checked by moving fonts and texts in internal flash. Facing the same issue.
Will check for the DMA2D registers and update you accordingly.

 

Thankyou for your quick response.

 

Regards, 

Pitbull

 

Hii @Flemming Gram CHRISTENSEN 

 

I have checked the DMA2D ISR registers and the response looks okay. But the problem seems to persist. I have also tried disabling the DMA2D ChromART accelerator but even then the touchGFX hangs when text is visible.

 

pitbull_0-1737793737631.png

 

Please guide me accordingly.

 

Thankyou

 

Regards,

Pitbull

You completely skip info TGFX version. Some was buggy with fonts...

Hello @MM..1 

 

Sorry for the inconvenience caused. 

TouchGFX Version : 4.22.0

STM32CubeIDE Version : 1.15.1

STM32CubeMX Version : 6.11.1

 

I am currently using the same version with stm32f746 Discovery Board and do not face any issue. 

But using texts in this custom setup causes touchGFX to hang.

 

Following are MPU Settings :-

pitbull_0-1737797891008.png

pitbull_1-1737797914312.png

pitbull_2-1737797943314.png

 

 

Thankyou

 

Regards,

Pitbull

Hii @Flemming Gram CHRISTENSEN @MM..1 

 

Another finding is that if I keep the text visible but the value in the text is set to white spaces "             " then the touchGFX does not hang and continues working as expected.

But even if we add a single character, number or symbol in the text then the touchGFX hangs and gets stuck.
So as @MM..1  is suggesting there might be issue with Fonts but I am unable to track it down.

Following is the text configuration in touchGFX :-

pitbull_0-1737799108158.png

 

Thankyou

 

Regards,

Pitbull

pitbull
Associate III

Hello @MM..1 

 As you suggested I tried updating touchGFX to 4.22.1 but the issue persists.

But again as you said it is definitely a issue with font as entering white spaces renders the text area perfectly.

Will try with different touchGFX versions and will keep you posted.

Thankyou for your guidance.

 

Regards,

Pitbull