cancel
Showing results for 
Search instead for 
Did you mean: 

Re-configuring a STM32H747I-DISCO TouchGFX-generated project to use DSI-video mode instead of DSI-adapted command mode to write to the display

AKlin.2
Associate

I am currently working on a project that will ultimately involve switching out the native display on the STM32H747I-DISCO with a new one (MDT0500AISC-MIPI). This new display utilizes a MIPI-DSI interface, but unlike the native display, does not have any onboard GRAM. Before switching to the new display, I want to get the native display to run in DSI-video mode in order to prove the STM32H747I-DISCO can drive displays without leveraging on-display GRAM. I have tried to follow every bit of information between datasheets, ST guides, and forum posts that I can, but every attempt has resulted in the display remaining blank.

I am hopeful that someone here has worked through something similar and can help.

Steps I have taken so far:

  • Generate project in TouchGFX with a single screen displaying an image (this defaults to using DSI adapted command mode with TE pin)
  • Build and load project onto STM32H747I-DISCO (using CubeIDE) to verify that it works and displays the generated screen
  • Open the project in CubeMX and change settings to those that I understand support DSI video mode:
    • LTDC:
      • Changed no parameters here. I expect that these should carry over to also work properly in DSI video mode.
    • DSIHOST:
      • Change mode from 'Adapted Command Mode with TE Pin' to 'Video Mode'
      • Commands:
        • Changed 'During HS Video Mode, Commands are Transmitted in' from 'High Speed' to 'Low Power'
        • Changed 'The size of the LP largest packet that can fit in a line during VACT region' from 0 to 8
        • Changed 'The size of the LP largest packet that can fit in a line during VSA, VBP and VFP regions' from 0 to 28
    • Software Packs:
      • STMicroelecronics.X-CUBE-TOUCHGFX.4.18.1_M7
        • Changed Display Interface from 'Custom' to 'Parallel RGB (LTDC)'

  • Pressed 'Generate Code' in CubeMX
  • Build and load project onto STM32H747I-DISCO using CubeIDE. Results in a blank screen

It is my understanding that I should be able to use CubeMX convert a TouchGFX project from using DSI adapted command mode to using DSI video mode on native hardware without needing to write additional custom code. I think I am close to the proper solution, but I'm obviously missing something.

If anyone has had to go through a similar process and has insight, I would greatly appreciate your input.

2 REPLIES 2
MM..1
Chief II

Maybe at first you dont waste time with LCD if you plan use other.

Every display have own IC controllers and if is different, your code on one dont work on second.

Too your idea with start TGFX isnt simple. Normal way is test display without TGFX first.

Then basic steps for video mode:

  1. Create new project in IDE with DISCO setup
  2. Activate and test SDRAM (add BSP code ...)
  3. Config LTDC to one layer any colour background
  4. Config DSI for your new LCD
  5. In user part code reset lcd start LTDC and in main place HAL Testpattern code start
/**
  * @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)

now try config DSI ... to stable LCD show colour bars, after ok comment out or stop generator and check background color LTDC showed on LCD,

RetroInTheShade
Associate III

Hi,

I’ve had success going through the same process with the STM32F469-DISCO. It did take some persistence!

I would agree with @MM..1​ to start without Touchgfx and focus on getting the LCD initialised in video mode and pattern generator working.

It is not a bad option starting with the native LCD on the disco as this eliminates uncertainty about hardware connectivity with your new LCD.

There should be an example project on the ST repo LCD_DSI_VideoMode_SingleBuffer which will include the necessary initialisation commands.