Skip to main content
manto.1
Associate III
October 3, 2022
Question

Why does model::tick() not getting called?

  • October 3, 2022
  • 1 reply
  • 892 views

I found out that LTDC interupt callback is not getting called but can't figure why.

Following code is auto generated by CubeMX LTDC interrupt is enabled in NVIC.

"TouchGFXGeneratedHAL.cpp"

extern "C"
{
 void HAL_LTDC_LineEventCallback(LTDC_HandleTypeDef* hltdc)
 {
 if (!HAL::getInstance())
 {
 return;
 }
 
 if (LTDC->LIPCR == lcd_int_active_line)
 {
 //entering active area
 HAL_LTDC_ProgramLineEvent(hltdc, lcd_int_porch_line);
 HAL::getInstance()->vSync();
 OSWrappers::signalVSync();
 
 // Swap frame buffers immediately instead of waiting for the task to be scheduled in.
 // Note: task will also swap when it wakes up, but that operation is guarded and will not have
 // any effect if already swapped.
 HAL::getInstance()->swapFrameBuffers();
 GPIO::set(GPIO::VSYNC_FREQ);
 }
 else
 {
 //exiting active area
 HAL_LTDC_ProgramLineEvent(hltdc, lcd_int_active_line);
 
 // Signal to the framework that display update has finished.
 HAL::getInstance()->frontPorchEntered();
 GPIO::clear(GPIO::VSYNC_FREQ);
 }
 }
}

0693W00000UnC2bQAF.png 

This topic has been closed for replies.

1 reply

N. SANTINI
ST Employee
October 20, 2022

Hi,

There could be several reasons for that but more information is needed here.

First, what is your STM32 ? Have you compared your code with the Board Setup of the closest MCU ?

Could you please specify your display definition, a well as the LTDC frequency you set ?

Do you reach the TouchGFXGeneratedHAL::enableInterrupts() call ?

If not, do you pass the TouchGFXGeneratedHAL::initialize() call successfully ?

What about LTDC registers ? Do you see the interrupts enabled in IER register ?

Could you maybe share more of your project in not all, notably the main.c (with LTDC init, ltdc.c otherwise) and full TouchGFXGenerated.cpp, TouchHAL.cpp and TouchGFXConfiguration.cpp ?

Best regards,

Nicolas