2023-02-03 03:56 PM
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.
Which creates the task, I can follow it into app_touchgfx.c, and on to TouchGFXConfiguration.cpp
The hal.taskEntry() takes me to HAL.hpp. No where else.
Looking at another example the hal.TaskEntry() goes to TouchGFXHAL.cpp and has code:What 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.
here:
Are there some steps that I missed to get the LCD to show what I have built in touchGFX?
Thanks
Shane
2023-02-04 06:58 AM
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.
2023-02-06 10:29 AM
Thanks for the response.
NVIC is enabled like the screen shot below. The interupt was getting called before I enabled FreeRTOS.
I 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:
After I setup FreeRTOS like this:
I can drill into the task it created,
to hal.taskEntry(), there is no code / function for hal.taskEntry(). Shouldn't TouchGFX have generated the code?
Thanks
2023-02-06 01:49 PM
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...
2023-02-07 04:56 PM
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
2023-02-07 08:47 PM
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
2023-02-08 03:54 AM
Try repeat 4.21.1 , but with actual setup or always check if RTOS HEAP is 32k or more
2023-02-08 08:29 AM
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.
2023-02-08 05:16 PM
ok thank you very much both :thumbs_up: We will have a look at it.
2023-02-10 04:49 PM
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