Showing results for 
Search instead for 
Did you mean: 

STM32U5A9 MIPI DSI Configuration Issue - Distorted Images / Timeout

Associate II

Hello ST Community,

I'm facing a MIPI DSI configuration issue with my STM32U5A9 and TFT LCD. When using PHY DSI as the DSI lane byte clock source, my code fails with a timeout on HAL_DSI_ShortWrite. When I switch to PLL3P, the initialization proceeds, but the LCD displays distorted images.

Request for Assistance: I'm new to MIPI and suspect a misconfiguration in clock settings. Any insights on proper configurations or similar experiences with STM32U5A9 MIPI DSI would be greatly appreciated.


  • MCU: STM32U5A9
  • LCD: TFT LCD with st7796S
  • Clock Source: PHY DSI (fails) / PLL3P (distorted images)




Your help in resolving this challenge is appreciated. Share your insights or suggestions if you've encountered a similar problem.

Thank you,

Associate II

Characters have been successfully displayed on the LCD; however, they appear inverted and mirrored. Assistance in identifying the underlying issue would be greatly appreciated.

Your guidance in this matter would be highly appreciated.

First try

  * @brief  Start test pattern generation
  * @PAram  hdsi  pointer to a DSI_HandleTypeDef structure that contains
  *               the configuration information for the DSI.
  * @PAram  Mode  Pattern generator mode
  *          This parameter can be one of the following values:
  *           0 : Color bars (horizontal or vertical)
  *           1 : BER pattern (vertical only)
  * @PAram  Orientation  Pattern generator orientation
  *          This parameter can be one of the following values:
  *           0 : Vertical color bars
  *           1 : Horizontal color bars
  * @retval HAL status
HAL_StatusTypeDef HAL_DSI_PatternGeneratorStart(DSI_HandleTypeDef *hdsi, uint32_t Mode, uint32_t Orientation)

after this work next step is framebuffer setup...

Dumping the framebuffer and displaying it on GIMP confirms that the transmitted framebuffer is accurate, but there seems to be a misinterpretation by the Display controller.


I've attempted various configurations on the controller's side to address the issue, but the text continues to display as mirrored.


Alternating the MX bit in the this register, had not impact on the outcome - Any ideas would be much appreciated!

@MM..1 @KDJEM.1 @Tesla DeLorean 

I'm encountering challenges with the ST7796S display controller while attempting to implement certain commands. While some commands, like turning on the display or inverting colors, have the desired impact, the font appears inverted in the displayed image.

Upon inspecting with a scope, it appears that DSI is utilizing the HS clock, and despite my attempts, I haven't been successful in transitioning it to LP clock usage. This clock transition seems crucial during command transmission.

I have a few specific questions:

1. How can I configure the MIPI of U5 to transition from HS mode to LP mode?
2. What could be causing the controller to understand some commands while failing to comprehend others?
3. Are there specific measures I can take to address these issues effectively?

Any assistance or guidance on resolving these concerns would be greatly appreciated.

Thank you.