cancel
Showing results for 
Search instead for 
Did you mean: 

Graph task not running. (Problem with LTDC in STM32H7.)

Yunus ARI
Senior

Hi everyone

I am working on a project with STM32H750 chip. I use internal flash for run application. I want to use vga display. So for this, I disabled touch controller and configured LTDC for vga. I fixid the erros and load tha aplication in chip. 

When I try to run application, code goes to "hal.taskEntry()" but never go to "setupScreen()" funtion. I debug code until "OSWrappers::waitForVSync()" function. When in this function never returned back. Then code gone "vApplicationIdleHook" continuously.

I created project with TouchGFX designer with by choosing STM32H750 Disco board. Then I configured project with CubeMX. I use TouchGFX 4.15 software. 

I completely stuck in here. Thanks for your opinion in advance.

Edit; 

I want to explain last status of problem. I writed this in a reply on below but I thought it better be here too;

As a new strategy, I created a project with CubeMX and add TouchGFX later. My problem with freeRTOS is solved when do this.

Now LTDC became the main problem. Code sometime crashed in LTDC init and sometime crashed in LTDC interrupt.

I seen this topic. Some other community member too have taken problem with LTDC in STM32H7 chip like me. But this topics answers too not solved my new problem.

Code crashed this line of HAL_LTDC_Init funtion when LTDC initialize;

HAL_StatusTypeDef HAL_LTDC_Init(LTDC_HandleTypeDef *hltdc)
{
...
 
  /* Configure the HS, VS, DE and PC polarity */
  hltdc->Instance->GCR &= ~(LTDC_GCR_HSPOL | LTDC_GCR_VSPOL | LTDC_GCR_DEPOL | LTDC_GCR_PCPOL);
 
....
}

For the additional information my used VGA circuit scheme is here;0693W000006EjbYQAS.png

1 ACCEPTED SOLUTION

Accepted Solutions

I did it step by step like you said and found the problem. My problem root cause is in external crystal. Probably hardware is wrong assembled. I select HSI clock an all problem is solved. 

Thank you for helping.

View solution in original post

10 REPLIES 10
MM..1
Chief

Check ltdc interrupt is enabled and priority setup...

Yunus ARI
Senior

LTDC interrupt is enable.

LTDC interrupt is enable. Actually, I take an error in LTDC init too. When "HAL_LTDC_Init" function is called, code crushing here;

hltdc->Instance->GCR &= ~(LTDC_GCR_HSPOL | LTDC_GCR_VSPOL | LTDC_GCR_DEPOL | LTDC_GCR_PCPOL);

When I closed this funtion "__HAL_RCC_LTDC_CLK_ENABLE();", code start running. This doesn't make much sense to me. May be the problem is here. What do you think?

You dont write , how IDE you use to compile, but your steps i dont prefer.

My classic start is in CubeIDE workspace click new project , and with wizard create base and ioc.

Then use MX to setup and generate base HAL. Next step check LTDC FMC and LCD working.

Then add software pack TouchGFX and configure ...

Maybe your regenerated code dont have process TouchGFX started, MX generate defaultTASK without call it, you need add line...

I create project with TouchGFX designer with selecting STM32H750 board. Then I configured CubeMX setup and used Ewarm V8.32 IDE.

My custom board don't have all component that in STM32H750 board. For this reason I deleted initialize function that this components.

Then try to run application. This all I do.

Maybe we cant help you , because gived info isnt complex. Simply when you start with project with TouchGFX, then without remove any lines your project work in EW? Work i mean compile and in selected board work ok.

Then you can try your custom and remove step by step...

I not use EW, then maybe others help you.

Actually I dont have a H750 Discovery board. So I dont know this project work or not because I can't tested.

I changed my strategy. I created a project with CubeMX and add TouchGFX later. My problem with freeRTOS is solved when do this.

Now LTDC became the main problem. Code sometime crashed in LTDC init and sometime crashed in LTDC interrupt.

I seen this topic. Some other community member too have taken problem with LTDC in STM32H7 chip like me. But this topics answers too not solved my new problem.

Edit; 

Code crashed this line of HAL_LTDC_Init funtion when LTDC initialize;

HAL_StatusTypeDef HAL_LTDC_Init(LTDC_HandleTypeDef *hltdc)
{
...
 
  /* Configure the HS, VS, DE and PC polarity */
  hltdc->Instance->GCR &= ~(LTDC_GCR_HSPOL | LTDC_GCR_VSPOL | LTDC_GCR_DEPOL | LTDC_GCR_PCPOL);
 
....
}

Edit;

For the additional information my used VGA circuit scheme is here;0693W000006EjbYQAS.png

MM..1
Chief

Im not expert for H7 , but when i have trouble with hw , i start clean project only with necesary hw without RTOS .

For your sys i recommend start with new ioc and setup only LTDC to RGB888 mode. When you plan use external SDRAM , then wait with this after ltdc will work with internal small framebuffer and background color setup only.

For VGA you need make too special clock config to work with ideal hsync vsync...

Creating just LTDC projet seems good idea. I will try this.

I using this configuration for VGA setting;

https://www.dasrotemopped.de/bilder/stm32f429i-disco_vga-timing.png

Now found this document too;

https://www.embeddedartists.com/wp-content/uploads/2018/06/Display_Expansion_Board_Users_Guide.pdf

I will try both settings. I will write the results.