2024-11-14 09:38 PM - edited 2024-11-14 09:54 PM
Hi,
I`m new to MIPI DSI, and still learn how to use it.
Recently, I develop with my custom board and start with MIPI interface display. Then config with CUBEMX, but after compile program, it always stuck in HAL_DSI_Iinit while loop below
/* 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;
}
}
}
I follow the AN4860 to setting the same method with my MIPI display.
Is any suggestion to solve this problem?
Thanks for any help!
2024-11-14 10:03 PM
Hello @Charlie CHEN ,
Which STM32 board used?
I advise you run the ready-to-use DSI example, this will help you on the configuration.
Check the DSI clock, try maybe to decrease it.
2024-11-14 10:22 PM - edited 2024-11-14 11:34 PM
Hi. @Imen.D
Thanks for your reply.
My custom board is designed with STM32U599.
Can you advise the suitable DSI Clock that I can reference?
And I download STM32U5A9J-DK example to see what different, but still no solution.
Additional, in the function, it`ll never pass the while loop.
PSR = 0x1528
DSI_PSR_PSS0 = 0x10
DSI_PSR_PSSC = 0x04
line here,
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;
}
}
Is any possibility of wrong setting will cause the problem?
Thanks
2024-11-15 12:46 AM
The DSI clock should be derived from the clock tree PLL3.PLLP (ck_plldsi) clock for instance to allow a switch-off of the PLL DPHY to save power during the ULPM phase.
You can find more information about the clock configuration in the README.md.
Also, check the timing configuration and the pixel clock configuration from the Datasheet.
Note that the LTCD_CLK must be calculated using the parameters from the display datasheet.
Check the pin configuration and if you are using pins swapped or you have signals inverted.
2024-11-15 01:07 AM
Hi @Imen.D
This is my MIPI display timing parameter.
And LTDC Timing setting.
Is there something I missed?
Thanks
2024-11-17 05:20 PM
Hi,
I have been stuck for couple days.
Is anyone can help?
Thanks