AnsweredAssumed Answered

STM32F756 LTDC transfer complete interrupt after the SDRAM buffer completely read in one frame

Question asked by kasapoglu.orkun on Dec 8, 2016
Latest reply on Mar 4, 2017 by kasapoglu.orkun

Hi all.

 

I'm controlling a parallel device which is using 12 bits parallel interface plus clock signal. I've created a class which is containing LTDC to pass the parallel data to the device with 30 MHz clock. Device has got 1 x 720 data blocks then it needs to latch the data to it's internal memory so I need to check one frame has been sent. I didn't find any interrupt about that. I am not using DMA2D because (I think) I don't need any blending for now. Anyway, I can check the signals with scope and there is no problem. Is there any interrupt about LTDC one frame has been sent? I've tried to set Line Interrupt to line zero but interrupt isn't occurring.

 

stm32f103x8 define commandline

LTDC_HandleTypeDef ltdc;

void LTDC_Init(void)
{
 /* LTDC Initializaition ----------------------------------------------------*/
 if (ltdc.State == HAL_LTDC_STATE_RESET)
 {
  /* Polarity configuration */
  /* Initialize the horizontal synchronization polarity as active low */
  ltdc.Init.HSPolarity = LTDC_HSPOLARITY_AL;
  /* Initialize the vertical synchronization polarity as active low */
  ltdc.Init.VSPolarity = LTDC_VSPOLARITY_AL;
  /* Initialize the data enable polarity as active low */
  ltdc.Init.DEPolarity = LTDC_DEPOLARITY_AL;
  /* Initialize the pixel clock polarity as input pixel clock */
  ltdc.Init.PCPolarity = LTDC_PCPOLARITY_IPC;
  
  /* Timing configuration */
  ltdc.Init.HorizontalSync = PIXEL_HSYNC - 1;
  ltdc.Init.VerticalSync = PIXEL_VSYNC - 1;
  ltdc.Init.AccumulatedHBP = (PIXEL_HSYNC + PIXEL_HBP - 1);
  ltdc.Init.AccumulatedVBP = (PIXEL_VSYNC + PIXEL_VBP - 1);
  ltdc.Init.AccumulatedActiveH = (PIXEL_HSYNC + PIXEL_HBP + PIXEL_HEIGHT - 1);
  ltdc.Init.AccumulatedActiveW = (KPIXEL_VSYNC + KPIXEL_VBP + PIXEL_WIDTH - 1);
  ltdc.Init.TotalHeigh = (PIXEL_HSYNC + PIXEL_HBP + PIXEL_HEIGHT + PIXEL_HFP - 1);
  ltdc.Init.TotalWidth = (PIXEL_VSYNC + PIXEL_VBP + PIXEL_WIDTH + PIXEL_VFP - 1);
  /* Initialize the lcd pixel width and height */
  ltdc.LayerCfg->ImageHeight = PIXEL_HEIGHT;
  ltdc.LayerCfg->ImageWidth = PIXEL_WIDTH;
  
  /* Background val */
  ltdc.Init.Backcolor.Red = PIXEL_RED;
  ltdc.Init.Backcolor.Green = PIXEL_GREEN;
  ltdc.Init.Backcolor.Blue = PIXEL_BLUE;
  
  ltdc.Instance = PIXEL_INSTANCE;
  
  LTDC_ClockConfig(&ltdc, NULL);
  
  HAL_LTDC_MspInit(&ltdc);
  
  if (HAL_LTDC_Init(&ltdc) != HAL_OK)
  {
    return;
  }
  
  LTDC_LayerInit();
  
  __HAL_LTDC_CLEAR_FLAG(&ltdc, LTDC_FLAG_LI);
  __HAL_LTDC_CLEAR_FLAG(&ltdc, LTDC_FLAG_FU);
  __HAL_LTDC_CLEAR_FLAG(&ltdc, LTDC_FLAG_TE);
  __HAL_LTDC_CLEAR_FLAG(&ltdc, LTDC_FLAG_RR);
  
  /*********************************************/
  HAL_LTDC_ProgramLineEvent(&ltdc, 0);
  
  __HAL_LTDC_ENABLE_IT(&ltdc, LTDC_IT_LI);  
 }
 /* SDRAM Initializaition ----------------------------------------------------*/
 if (BSP_SDRAM_Init() == SDRAM_ERROR)
 {
   return;
 }

 

__HAL_LTDC_ENABLE(&ltdc);
 }

 

void HAL_LTDC_LineEventCallback(LTDC_HandleTypeDef *ltdch)
{
  KPixel_lineEvent = 0xFF;
}

 

// stm32f7xx_it.c

extern LTDC_HandleTypeDef ltdc;

void LTDC_IRQHandler(void)
{
  HAL_LTDC_IRQHandler(&ltdc);
}

 

interrupt is rising when after the LTDC configured then I'm writing the SDRAM bus one line, it is not rising anymore.

Outcomes