cancel
Showing results for 
Search instead for 
Did you mean: 

DSI video mode , howto sync properly?

MM..1
Chief

I place init call for send config to display in generated MX_DSIHOST_DSI_Init

to end user code

VidCfg.LPVerticalBackPorchEnable = DSI_LP_VBP_ENABLE;
  VidCfg.LPVerticalSyncActiveEnable = DSI_LP_VSYNC_ENABLE;
  VidCfg.FrameBTAAcknowledgeEnable = DSI_FBTAA_DISABLE;
  if (HAL_DSI_ConfigVideoMode(&hdsi, &VidCfg) != HAL_OK)
  {
    Error_Handler();
  }
  if (HAL_DSI_SetGenericVCID(&hdsi, 0) != HAL_OK)
  {
    Error_Handler();
  }
  /* USER CODE BEGIN DSIHOST_Init 2 */
  HX8394D_Init(HX8394D_FORMAT_RGB888, LCD_ORIENTATION_LANDSCAPE);
 
  /* USER CODE END DSIHOST_Init 2 */

Display works, but not always is synced. Sometimes is horizontaly shifted.

How is regular way to sync start DSI video burst mode?

My display sync ok, but sometimes sync with this skip lines:

4 REPLIES 4
Imen.D
ST Employee

Hello @MM..1​ ,

Did you start and enable the DSI Host after the LTDC has been enabled ?

I recommend you this AN4860 Application note that helps you on DSI Host configuration (in section : 6.1 DSI Host video burst mode) with provided example .

A set of example also are provided in STM32Cube firmware package.

For example with STM32CubeF7: STM32Cube_FW_F7_V1.11.0\Projects\STM32F769I_EVAL\Examples\LCD_DSI

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Sorry, i use AN4860 last year, and examples LCD_DSI is unusable, try read it... here not exist ioc files. But i chek only latest F4 1.25.2 fw.

And i write my DSI display works, but not all startup is same.

DSI is started after reset LCD before send commands in HX8394D_Init

MM..1
Chief

@Imen DAHMEN​ i add image with trouble on 480x1280 DSI sometimes display work ok , sometimes as on image. Skipped is every 4 line.

MM..1
Chief

I solve horizontal shifted image with second call this in main after around half second from dsi init

  if (HAL_DSI_ConfigVideoMode(&hdsi, &VidCfg) != HAL_OK)
  {
    Error_Handler();
  }

and image trouble with skipped lines i correct with other porch numbers, but this all i solve within debug build with optimize 0.

After switch to release build with higher optimize levels in C lang skipped lines is randomly back.

How to init DSI ???