cancel
Showing results for 
Search instead for 
Did you mean: 

I'm trying to get a TFT display to work using Touch GFX on a custom board. Why doesn't the display I make in touch GFX show up?

SWood.4
Associate III

320x240 Parallel RGB (LTDC) interface. I've been following the TouchGFX board bring up instructions. I can change the background color, so the hardware side should be good.

I made a display in TouchGFX, everything compiles. TouchGFX updated the files in CubeIDE project folder. My display only shows the default color that I put in the frame buffer when initializing, before starting FREERTOS.

Following the instructions the MX_LTDC_Init is getting raised.

https://support.touchgfx.com/4.21/docs/development/board-bring-up/how-to/03-display-internal

I've enabled FreeRTOS and have two tasks enabled, one blinking an LED that is working. The other set up for TouchGFXTask like the instructions.

0693W00000Y9ypSQAR.png Which creates the task, I can follow it into app_touchgfx.c, and on to TouchGFXConfiguration.cpp

0693W00000Y9yqGQAR.pngThe hal.taskEntry() takes me to HAL.hpp. No where else.

Looking at another example the hal.TaskEntry() goes to TouchGFXHAL.cpp and has code:0693W00000Y9yquQAB.pngWhat should be at hal.taskEntry()?

The instructions also reference the LTDC_IRQHandler again. I don't find this section of code below anywhere. Should I add it and if so where? Now that I have enabled FREERTOS, the LTDC_IRQHandler in stm32l4xx_it.c doesn't get raised.

0693W00000Y9yrdQAB.pnghere:

https://support.touchgfx.com/4.21/docs/development/touchgfx-hal-development/scenarios/scenarios-ltdc-parallel-rgb

Are there some steps that I missed to get the LCD to show what I have built in touchGFX?

Thanks

Shane

9 REPLIES 9
MM..1
Chief II

In scenario end missed info about NVIC priority setup and every display need right init , that isnt part of MX or TouchGFX. Simply check with scope if LCD is unreset and signals vsync hsync ... exist.

Plus read and do init aka LCD pdf says.

SWood.4
Associate III

Thanks for the response.

NVIC is enabled like the screen shot below. The interupt was getting called before I enabled FreeRTOS.

0693W00000YA4wQQAT.pngI checked vsync and hsync with scope the signals look good.

For the init, I don't see much in the PDF to init.

This article has almost the same parameter's other than the display size. I double checked my settings against this:

https://community.st.com/s/article/how-to-set-up-the-ltdc-peripheral-to-interface-with-the-display-panel-atm0500d27-ct-from-az-displays

After I setup FreeRTOS like this:

0693W00000YA53vQAD.pngI can drill into the task it created,

0693W00000YA5MwQAL.pngto hal.taskEntry(), there is no code / function for hal.taskEntry(). Shouldn't TouchGFX have generated the code?

Thanks

MM..1
Chief II

Last changed was heap size then maybe this helps, but i mean latest TGFX generate bad code for L4

seems optimized for an hires DSI displays...

SWood.4
Associate III

With much help from "MM..1" he figured out that touch GFX version 4.21.1 generated bad code for the the STM32L49. When we used version 4.17 the display worked. I also tested on version 4.20 and the code generated works. I also had " HAL_LTDC_SetAddress(&hltdc, framebuffer, LTDC_LAYER_1);" still in my code from earlier testing, this wasn't needed after it was verified that the display color would change and I was enabling touchGFX.

Thanks

Hi,

Could you help us point out what bad code should be fixed ? Please share anything to Osman or Yoann through private message if codes cannot be shared publicly.

/Romain

Try repeat 4.21.1 , but with actual setup or always check if RTOS HEAP is 32k or more

SWood.4
Associate III

I'll triple check 4.21.1. What I did is after we got 4.17 to work, I started again from scratch with 4.17 to make sure I was getting everything setup correctly, then started from scratch for 4.20 and both worked. I then started from scratch again on 4.21.1, using the same settings and it didn't work. I believe the RTOS HEAP was at 30K. I'll double check the 4.21.1 settings and increase the RTOS HEAP.

ok thank you very much both �� We will have a look at it.

SWood.4
Associate III

Follow up on the 4.21.1 version: I increased the RTOS Heap to 40k and the task stack size to 5000, then the display worked. I tried to figure which change made the display work, and set the heap back to 30k and task stack size to 4096 and the display still worked. This is the same project and version that didn't work a couple of days ago. The only other significant change I made between then and now is I installed 4.21.0 to see if the display would work with 4.21.0. After I verified 4.21.0 worked I made the heap and stack changes to 4.21.1. I don't remember making any other changes to that project. I was hoping to narrow down the change that fixed it, I'm not sure if 4.21.1 needed something that was installed/updated by 4.21.0, or something else changed that made it work?

Is there any else you would like me to test or check?

Thanks