Skip to main content
hbarta2
Associate III
October 22, 2015
Question

STM32F429I LTDC VSYNC ISR

  • October 22, 2015
  • 2 replies
  • 1184 views
Posted on October 22, 2015 at 21:18

Hi folks,

We're using an STM32F429I to drive an LCD using H/W similar enough to the STM32F429I-DISCO board so that I was able to get this working by using the STemWin BSP files from one of the demos. (Some tweaking was required to accommodate MX initialization and different display resolution.)

I would like to implement double buffering to solve some display issues we are experiencing. I have found where the BSP code swaps buffers in LCDConf_stm32f429i.c in void HAL_LTDC_LineEvenCallback(LTDC_HandleTypeDef *hltdc). Unfortunately that code never executes, as if we are not configured for the interrupt. 

Examining the device configuration in MX I see that we are configured for both LTDC global interrupt and LTDC global error interrupt. (The error interrupt sometimes fires on startup but otherwise seems to do no harm.)

Is there something else that needs to be done to enable the VSYNC or line (HSYNC?) interrupt? I looked at the API calls in stm32f4xx_hal_ltdc.c and saw nothing that seemed to relate to enabling interrupts. They are configured and enabled in ltdc.c (HAL_NVIC calls.) LTDC_IRQHandler(void) is defined in stm32f4xx_it.c and calls HAL_LTDC_IRQHandler() which eventually calls HAL_LTDC_LineEvenCallback() so it seems that everything is in place.

What could we be missing that interferes with the line event callback?

Thanks!

    This topic has been closed for replies.

    2 replies

    hbarta2
    hbarta2Author
    Associate III
    October 22, 2015
    Posted on October 22, 2015 at 22:02

    Found it! :D

    In the transition from demo/BSP to MX/HAL I lost the line 

    HAL_LTDC_ProgramLineEvent(&hltdc, 0); 

    in LCD_LL_Init(). Restoring it has the line event interrupts working as expected.

    rafael2399
    Associate
    November 20, 2015
    Posted on November 20, 2015 at 02:42

    this also works:

    // LTDC_SRCR_IMR  :Immediate Reload 

    //LTDC_SRCR_VBR  : Vertical Blanking Reload 

    L

    tdcHandler.Instance->SRCR = LTDC_SRCR_VBR;