2025-09-08 8:01 AM
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,
UI should be more than 2ns, so I use a 500MHz bit clock.
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?
Solved! Go to Solution.
2025-09-08 4:31 PM
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.
2025-09-08 4:31 PM
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.
2025-09-08 11:09 PM
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
2025-09-09 7:30 AM
Yes, AN4860 and AN4861 are must see before beginning display projects.
2025-09-29 3:04 AM
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 ?
2025-09-29 5:36 AM
2025-09-29 6:11 AM
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
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);
2025-09-29 6:24 AM
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