cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U5G9J-DK1 drive LCD with single lane

bytespectrum
Associate III

Hi Community,

 

I have STM32U5G9J-DK1 board and I am able to run several graphics firmware by using 2 data lanes of DSI host.

However, in my custom board (yet to develop), we will have only single data lane LCD module.

So, I want to try single lane firmware in STM32U5G9J-DK1 board. Firmware is not working (Nothing on display) if I change lane in CubeMX.

I have few question here.

1. As STM32U5G9J-DK1 board display module has 2 data lane, can I use only single data lane of it? If yes, what should I change in firmware (and/or hardware) to make it possible? 

2. If above is not possible due to some limitation, I have to connect single data lane LCD module with STM32U5.Do you have any suggestion of LCD module that I can purchase? What change I need to make in my firmware to make that LCD module work.

 

Thanks,

Tarun

1 ACCEPTED SOLUTION

Accepted Solutions
GaetanGodart
ST Employee

Hello @bytespectrum ,

 

I have asked a colleague who knows more about hardware.

 

To answer your questions :


1. As STM32U5G9J-DK1 board display module has 2 data lane, can I use only single data lane of it? If yes, what should I change in firmware (and/or hardware) to make it possible? 


Even though the STM32U5G9 can work with single lane DSI, you cannot use single lane data on the STM32U5G9-DK1.
This is because even though you can change the DSI host to single lane, you cannot change the LCD's DSI parameters.
However, the STM32U5G9 is perfectly capable of controlling a screen using single lane DSI so this should be no problem for the custom board you want to create.

 


2. If above is not possible due to some limitation, I have to connect single data lane LCD module with STM32U5.Do you have any suggestion of LCD module that I can purchase? What change I need to make in my firmware to make that LCD module work.


We cannot really recommend you a display as there is many of them, just make sure it can run a single lane DSI and the other communication protocol, voltage, etc are compatible with the board you want to use.
Keep in mind that DSI are quite complex to work with.
Here is a good starting point tutorial (they use a screen that I don't think is still sold) : initializing-mipi-dsi-displays-in-command-mode/ . This guide helps you adapt the connection to fit STM32 board as well as managing the setup of the screen.
Once you get your display, you could start creating your project by taking inspiration from the STM32U5G9-DK1 TBS but you will have to change the display firmware to match with the vendor's datasheet (initialization, timings, etc).

 

I hope this helps! :smiling_face_with_smiling_eyes:
If this comment or another one answer your questions, I invite you to select it as "best answer".

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

View solution in original post

9 REPLIES 9
GaetanGodart
ST Employee

Hello @bytespectrum ,

 

It should be possible to use only one lane but you have to make sure you get enough bandwidth.

You say that you changed lane in STM32CubeMX but if I look for DSI on the provided STM32U5G9J-DK1, it seems to be deactivated:

GaetanGodart_0-1725957003923.png

Can you run me through the steps you took to activate one lane?

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

Hi Gaetan,

Thanks for prompt response. Bandwidth is not a problem as of now for us.

I am using TouchGFX Designer to generate my firmware for STM32U5G9J-DK1 board.

I have attached my firmware which is working good with 2 lanes in same board.

As highlighted in below screen shot, I am changing data lines to one but it is not working.

bytespectrum_0-1725960467010.png

Thanks,

Tarun

GaetanGodart
ST Employee

Hello @bytespectrum ,

 

@bytespectrum wrote: Bandwidth is not a problem as of now for us.

That is a great thing.

 

I have looked at your project.
When changing to one lane, the value is correctly changed from DSI_TWO_LANE to DSI_ONE_LANE in main.c at line 434 :

 

hdsi.Init.NumberOfLanes = DSI_ONE_DATA_LANE;

 

However, I have not been able to compile your program in either cases.

 

I don't know how your project have the DSI enabled but not mine.
To create your project you:

  1. open TouchGFX Designer
  2. click on Create new
  3. Select STM32U5G9J-DK

When I do that I end up with a project that I can compile and that disable DSI.

If you followed the 3 steps above, did you select the project with FreeRTOS or with ThreadX?

Which version of TouchGFX and STM32CubeMX are you using? The latests?

 

I will be able to help you more tomorrow.

 

Regards,

 

Gaetan Godart
Software engineer at ST (TouchGFX)

Hi Gaetan,

TouchGFX version: 4.24.0

STM32CubeMX version: 6.12.0

Immediate problem that I noticed is, you are selecting wrong board. Please select STM32U5G9J-DK1 instead of STM32U5G9J-DK.

I used below board.

bytespectrum_0-1726031155134.png

I am looking at why you are not able to compile my project. 

Thanks,

Tarun

 

 

Hi Gaetan,

Here it is compiling fine. Which error you are getting while compiling?

Thanks,

Tarun

Hello @bytespectrum ,

 

Sorry for the misunderstanding, I will use the correct board from now.

 

When I unzip your file, the TouchGFX folder is missing files:

GaetanGodart_0-1726042915754.png

So I open the ioc file and generate code.

Back to the TouchGFX folder, I open the Application.Template.touchgfx.par file, this creates the STM32U5G9J-DK1.touchgfx file. I open this last one and click on Simulate (since the flash button is greyed out) and get this log :

Run Simulator
    Generate
        
        works fine

    Generate Assets
        
        works fine

    Post Generate
        touchgfx update_project --project-file=simulator/msvs/Application.vcxproj
        Done
    Post Generate Target
        touchgfx update_project
        .cproject file: ../STM32CubeIDE/.cproject
        Writing STM32CubeIDE project file: ../STM32CubeIDE/.project
        Writing STM32CubeIDE project file: ../STM32CubeIDE/.cproject
        Done
    Compile
        make -f simulator/gcc/Makefile -j8
        Reading ./application.config
        Reading ./target.config
        Compiling gui/src/screen1_screen/Screen1Presenter.cpp
        Compiling gui/src/screen1_screen/Screen1View.cpp
        Compiling gui/src/screen_screen/screenPresenter.cpp
        Compiling gui/src/screen_screen/screenView.cpp
        Compiling gui/src/model/Model.cpp
        Compiling gui/src/common/FrontendApplication.cpp
        Compiling generated/gui_generated/src/screen_screen/screenViewBase.cpp
        Compiling generated/gui_generated/src/common/FrontendApplicationBase.cpp
        In file included from gui/src/screen1_screen/Screen1View.cpp:1:0:
        gui/include/gui/screen1_screen/Screen1View.hpp:4:10: fatal error: gui_generated/screen1_screen/Screen1ViewBase.hpp: No such file or directory
         #include <gui_generated/screen1_screen/Screen1ViewBase.hpp>
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        In file included from gui/src/screen1_screen/Screen1Presenter.cpp:1:0:
        gui/include/gui/screen1_screen/Screen1View.hpp:4:10: fatal error: gui_generated/screen1_screen/Screen1ViewBase.hpp: No such file or directory
         #include <gui_generated/screen1_screen/Screen1ViewBase.hpp>
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        compilation terminated.
        compilation terminated.
        make[2]: *** [build/MINGW32_NT-6.2/gui/src/screen1_screen/Screen1Presenter.o] Error 1
        generated/simulator/gcc/Makefile:196: recipe for target 'build/MINGW32_NT-6.2/gui/src/screen1_screen/Screen1Presenter.o' failed
        make[2]: *** Waiting for unfinished jobs....
        make[2]: *** [build/MINGW32_NT-6.2/gui/src/screen1_screen/Screen1View.o] Error 1
        generated/simulator/gcc/Makefile:196: recipe for target 'build/MINGW32_NT-6.2/gui/src/screen1_screen/Screen1View.o' failed
        make[1]: *** [generate_assets] Error 2
        generated/simulator/gcc/Makefile:155: recipe for target 'generate_assets' failed
        simulator/gcc/Makefile:32: recipe for target 'all' failed
        make: *** [all] Error 2
        Failed
    Failed

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

Hi Gaetan,

Code is well compiling from STM32CubeIDE. I deleted simulator related files from TouchGFX file to minimize file size. I have attached TouchGFX folder which has all files. Just replaced folder in previous file I shared.

Do you have STM32U5G9J-DK1 board to try things practically?

Thanks,

Tarun

GaetanGodart
ST Employee

Hello @bytespectrum ,

 

I have asked a colleague who knows more about hardware.

 

To answer your questions :


1. As STM32U5G9J-DK1 board display module has 2 data lane, can I use only single data lane of it? If yes, what should I change in firmware (and/or hardware) to make it possible? 


Even though the STM32U5G9 can work with single lane DSI, you cannot use single lane data on the STM32U5G9-DK1.
This is because even though you can change the DSI host to single lane, you cannot change the LCD's DSI parameters.
However, the STM32U5G9 is perfectly capable of controlling a screen using single lane DSI so this should be no problem for the custom board you want to create.

 


2. If above is not possible due to some limitation, I have to connect single data lane LCD module with STM32U5.Do you have any suggestion of LCD module that I can purchase? What change I need to make in my firmware to make that LCD module work.


We cannot really recommend you a display as there is many of them, just make sure it can run a single lane DSI and the other communication protocol, voltage, etc are compatible with the board you want to use.
Keep in mind that DSI are quite complex to work with.
Here is a good starting point tutorial (they use a screen that I don't think is still sold) : initializing-mipi-dsi-displays-in-command-mode/ . This guide helps you adapt the connection to fit STM32 board as well as managing the setup of the screen.
Once you get your display, you could start creating your project by taking inspiration from the STM32U5G9-DK1 TBS but you will have to change the display firmware to match with the vendor's datasheet (initialization, timings, etc).

 

I hope this helps! :smiling_face_with_smiling_eyes:
If this comment or another one answer your questions, I invite you to select it as "best answer".

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)
bytespectrum
Associate III

Hi Gaetan,

Thanks, I got direction how to proceed.

Thanks

-Tarun