cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F479 DSI configuration for CO5300

CDecouen
Associate II

Hello everyone,

I want to use a C05300 based display with DSI. 

I can write and read in LP mode, but not in HS mode. I guess it's a timing problem.

As seen from datasheet, 

CDecouen_0-1757338207561.png

UI should be more than 2ns, so I use a 500MHz bit clock.

CDecouen_1-1757340572018.png

I use 24 bit data format to send data over DSI, so Pixel Clk = 480 x 2 / 24 = 40 MHz. 

I there something I miss?

1 ACCEPTED SOLUTION

Accepted Solutions
CDecouen
Associate II

Hi there, it seems that despite the datasheet specify there are two data lanes, only one is used... Unless there is something else to setup.

View solution in original post

7 REPLIES 7
CDecouen
Associate II

Hi there, it seems that despite the datasheet specify there are two data lanes, only one is used... Unless there is something else to setup.

Imen.D
ST Employee

Hello @CDecouen 

I recommend you have a look at this AN4860 Application note related to DSI Host on STM32 MCUs, providing guidelines and practical examples on how to configure the DSI Host depending on the operating mode.

Check the DSI PHY timings and DSI config on HS mode are compliant with the specification provided in the AN4860.

Can you try the DSI example in STM32CubeF4 firmware and update it according to your need. For example on : STM32CubeF4/Projects/STM32469I_EVAL/Examples/LCD_DSI at master · STMicroelectronics/STM32CubeF4 · GitHub

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

Yes, AN4860 and AN4861 are must see before beginning display projects.

HareshPrajapati
Associate II

Hi @CDecouen , I am also looking to use CO5300 display for my project.
Can you please provide information about
LCD_VFP, LCD_HFP, LCD_VSA, LCD_VBP, LCD_HSA, LCD_HBP ?

 

Hi @HareshPrajapati, here is the configuration I use for LTDC

CDecouen_0-1759149283272.png

 

 

HareshPrajapati
Associate II

Thanks @CDecouen 

here is my init code for the display with 180 degree rotation. its seems to working but not as accpected
do you think my 

Set column/row (example payloads) is okay?




  HAL_Delay(100);
  // Page 0
  HAL_DSI_ShortWrite(&hdsi, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0xFE, 0x00);

  // TE ON
  HAL_DSI_ShortWrite(&hdsi, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x35, 0x00);

  // Ctrl Display
  HAL_DSI_ShortWrite(&hdsi, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x53, 0x20);

  // Brightness
  HAL_DSI_ShortWrite(&hdsi, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x51, 0x80);  // 50% brightness
  HAL_DSI_ShortWrite(&hdsi, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x63, 0x00);

  uint8_t madctl = 0xC0;  // MX=1 → horizontal mirror
//   uint8_t madctl = 0x80;  // MY=1 → vertical mirror
//   uint8_t madctl = 0x60;  // MX=1 + MY=1 → 180° flip
  HAL_DSI_LongWrite(&hdsi, 0, DSI_DCS_LONG_PKT_WRITE, 2, 0x36, &madctl);
//  CO5300_SetRotation(2);

  // Set column/row (example payloads)
  uint8_t col[] = {0x00,0x08,0x01,0xD9};
  uint8_t row[] = {0x00,0x00,0x01,0xD1};
  HAL_DSI_LongWrite(&hdsi, 0, DSI_GEN_LONG_PKT_WRITE, 5, 0x2A, col);
  HAL_DSI_LongWrite(&hdsi, 0, DSI_GEN_LONG_PKT_WRITE, 5, 0x2B, row);


  // Sleep Out, Display ON
  HAL_Delay(100);
  HAL_DSI_ShortWrite(&hdsi, 0, DSI_DCS_SHORT_PKT_WRITE_P0, 0x11, 0);
  HAL_Delay(100);
 HAL_DSI_ShortWrite(&hdsi, 0, DSI_DCS_SHORT_PKT_WRITE_P0, 0x29, 0);
 HAL_Delay(120);

 

CDecouen
Associate II

I have 0xFF  for register #0x63

column and row start depends on display manufacturer. I use 00,06,01,D7 for columns and same as you for rows.

Hope this help, tuning those display parameters is very tricky