Skip to main content
MM..1
Chief III
December 3, 2020
Question

DSI video mode , howto sync properly?

  • December 3, 2020
  • 3 replies
  • 1342 views

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:

This topic has been closed for replies.

3 replies

ST Technical Moderator
December 4, 2020

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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
MM..1
MM..1Author
Chief III
December 5, 2020

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
MM..1Author
Chief III
December 8, 2020

@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
MM..1Author
Chief III
December 20, 2020

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 ???