Skip to main content
Graduate II
March 10, 2025
Question

DSI timeout waiting for DSI to be idle - DSI bit PSS0, PSS1 and PSSC are not being set?

  • March 10, 2025
  • 3 replies
  • 609 views

Hi,

I am new to STM32 and using DSI for the first time.

I generated the simplest code for bringing up a custom DSI display board using CubeMX and TouchGFX. The code compiles successfully, but the CubeMX-generated function HAL_DSI_Init() within MX_DSIHOST_DSI_Init() (code snippet below) returns HAL_TIMEOUT at line 26.

By default, HAL_TIMEOUT is set to 100ms, which is quite a long time...

 

 

 

 

 

 /* Get tick */
 tickstart = HAL_GetTick();
 if ((hdsi->Instance->PCONFR & DSI_PCONFR_NL) == DSI_ONE_DATA_LANE)
 {
 while ((hdsi->Instance->PSR & (DSI_PSR_PSS0 | DSI_PSR_PSSC)) != (DSI_PSR_PSS0 | DSI_PSR_PSSC))
 {
 if ((HAL_GetTick() - tickstart) > DSI_TIMEOUT_VALUE)
 {
 /* Process Unlocked */
 __HAL_UNLOCK(hdsi);

 return HAL_TIMEOUT;
 }
 }
 }
 else
 {
 while ((hdsi->Instance->PSR & (DSI_PSR_PSS0 | DSI_PSR_PSS1 | DSI_PSR_PSSC)) != (DSI_PSR_PSS0 | \
 DSI_PSR_PSS1 | DSI_PSR_PSSC))
 {
 if ((HAL_GetTick() - tickstart) > DSI_TIMEOUT_VALUE)
 {
 /* Process Unlocked */
 __HAL_UNLOCK(hdsi);

 return HAL_TIMEOUT; //##### IT RETURNS THIS TIMEOUT #####
 }
 }
 }

 

 

 

 

 

It seems that the code is waiting for the DSI bits DSI_PSR_PSS0, DSI_PSR_PSS1, and DSI_PSR_PSSC to be set, but they are not (as shown in the register view on the right side of the screenshot below). Any idea why these bits are not being set?

 

For reference, I’ve also included a series of screenshots of the DSI peripheral setup/configuration pages, along with the IOC file. Hopefully, this helps in troubleshooting the issue.

 

Thank you :)

 

Ricko_1-1741649691724.png

Ricko_2-1741650013285.png

Ricko_3-1741650020644.png

Ricko_4-1741650028995.png

Ricko_5-1741650046817.png

Ricko_6-1741650055422.png

Ricko_7-1741650078810.png

Ricko_8-1741650086856.png

Ricko_9-1741650101557.png

 

 

 

 

 

 

    This topic has been closed for replies.

    3 replies

    ST Employee
    April 24, 2025

    Hello,

    Could you try using the PLL3 as source of clock for the DSI

     

    Visitor II
    September 14, 2025

    Did you find a solution to this problem?
    I have the same problem.

    Graduate
    November 3, 2025

    Changing the Source Clock to PLL3 at the bottom of the Clock Configuration in the IOC fixed the problem for me

    ST Employee
    November 3, 2025

    To highlight answered topics, please click 'Accept as Solution' on the reply that solved your issue.