Skip to main content
Ebun.1
Senior
February 26, 2021
Solved

Change from DSI interface to RGB parallel interface

  • February 26, 2021
  • 16 replies
  • 4244 views

Thank you for helping.

environment:

MCU: STM32F769BI

Board: Custom

STM32CubeIDE Ver1.5.0

TouchGFX Ver4.15.0

Import the project created using the STM32F769I-DISCO template with TouchGFX with STM32CubeIDE,

After setting the LCD clock with GUI

I disabled DSI in the GUI and set the parameters for LTDC and TouchGFX.

The HSYNC, VSYNC, and DE signals are now output, but they are out of sync with the color signals.

What should I do to get in sync?

Also, is the initial setting of DMA2D correct as follows?

 hdma2d.Instance = DMA2D;

 hdma2d.Init.Mode = DMA2D_M2M;

 hdma2d.Init.ColorMode = DMA2D_OUTPUT_ARGB8888;

 hdma2d.Init.OutputOffset = 0;

 hdma2d.LayerCfg [1] .InputOffset = 0;

 hdma2d.LayerCfg [1] .InputColorMode = DMA2D_INPUT_ARGB8888;

 hdma2d.LayerCfg [1] .AlphaMode = DMA2D_NO_MODIF_ALPHA;

 hdma2d.LayerCfg [1] .InputAlpha = 0;

 if (HAL_DMA2D_Init (& hdma2d)! = HAL_OK)

 {

  Error_Handler ();

 }

 if (HAL_DMA2D_ConfigLayer (& hdma2d, 1)! = HAL_OK)

 {

  Error_Handler ();

 }

The waveform observed by the oscilloscope is attached.

A white image is pasted only on the left 1/4 of the screen.

Light blue (top) is DE and purple (bottom) is the R5 color signal.

You can see that it is shifting little by little.

Thank you. 

This topic has been closed for replies.
Best answer by MM..1

Configuation on F7xx is more complicated, you need perfect config on clock, memory manager, bus speed, caching usw.

Too i see maybe source for your trouble is your steps create project for DSI with TE clocking and then change it.

Try start from scratch clean IDE wizard select MCU and configure all parts.

16 replies

MM..1
Super User
February 26, 2021

This shifting is equal to horizontal sync porch intervals.

Edit: I make next see on your image and seems your config is not correct.

Maybe you setup quick dot clock and memory cant read at this speed...

Ebun.1
Ebun.1Author
Senior
February 27, 2021

Hi MM..1

Thank you for your reply.

The LCD resolution is 1024 * 768.

Load the project created with TouchGFX with Cube IDE

I set the parameters according to the liquid crystal as shown in the attached image.

The LCD clock is 56MHz.

(At least 52MHz, so it can't be too slow)

I would appreciate it if you could tell me in detail where the problem might be.

Thank you.

MM..1
Super User
February 27, 2021

When your custom board have SDRAM 32bit this clock can work , but with 16bit try 33MHz max

Ebun.1
Ebun.1Author
Senior
February 28, 2021

Hi MM ..1

Thank you for your reply.

The SDRAM interface is based on STM32F769I-DISCO and has a bus width of 32 bits.

Is there any problem?

Is this problem likely to be in hardware, not software?

MM..1
MM..1Best answer
Super User
February 28, 2021

Configuation on F7xx is more complicated, you need perfect config on clock, memory manager, bus speed, caching usw.

Too i see maybe source for your trouble is your steps create project for DSI with TE clocking and then change it.

Try start from scratch clean IDE wizard select MCU and configure all parts.

Ebun.1
Ebun.1Author
Senior
February 28, 2021

Hi MM ..1

I created a project by selecting the template of STM32F769I-DISCO with TouchGFX Ver4.15.0.

I loaded the project with STM32CubeIDE, opened the ioc file and made the following settings using the GUI.

・ Set the LCD clock to 56MHz

・ Disable DSI

・Change to RGB parallel interface

・Set the Display Interface of TouchGFX to Parallel RGB (LTDC)

・Set TouchGFX Application Tick Source to LTDC

I'm going to start with a clean wizard.

Is it something wrong with the settings?

Ebun.1
Ebun.1Author
Senior
March 1, 2021

Hi MM ..1

If I start with a clean IDE wizard

I don't think I can set the parameters because TouchGFX doesn't appear on the IDE.

MM..1
Super User
March 1, 2021

you need open software packages and add touchgfx to project

Ebun.1
Ebun.1Author
Senior
March 2, 2021

Hi MM ..1

Thank you for your reply.

When I created a scratch project in the IDE, set the peripherals, and added TouchGFX to the IDE project, the following error occurred.

Could you please tell me the cause of this error?

Thank you.

Ebun.1
Ebun.1Author
Senior
March 2, 2021

Hi MM ..1

I'm sorry.

There was a mistake in the parameter setting.

After fixing it, the error in the above image disappeared.

Thank you very much.

Ebun.1
Ebun.1Author
Senior
March 3, 2021

Hi MM ..1

When I finished the settings from scratch and built, I got the following error.

These are about TouchGFX.

After all, if you do not create a project with TouchGFX, you will get a missing error and you will not be able to move it.

Is it possible to grasp the cause of the color signal shift?

In file included from ../TouchGFX/target/generated/TouchGFXGeneratedHAL.cpp:18:0::

../TouchGFX/target/generated/TouchGFXGeneratedHAL.hpp:20:10: fatal error: touchgfx/hal/HAL.hpp: No such file or directory

 #include <touchgfx / hal / HAL.hpp>

     ^~~~~~~~~~~~~~~~~~~~~~

compilation terminated.

arm-none-eabi-gcc "../Middlewares/Third_Party/FreeRTOS/Source/timers.c" -mcpu = cortex-m7 -std = gnu11 -g3 -DUSE_HAL_DRIVER -DSTM32F769xx -DDEBUG -c -I ../Core/ Inc -I ../Drivers/STM32F7xx_HAL_Driver/Inc -I../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I../Drivers/CMSIS/Include- I ../TouchGFX/App -I../TouchGFX/target/generated -I../TouchGFX/target -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/ Source / CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1 -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF "Middlewares / Third_Party / FreeRTOS / Source / timers.d "-MT" Middleware / Third_Party / FreeRTOS / Source / timers.o "--specs = nano.specs -mfpu = fpv5-d16 -mfloat-abi = hard -mthumb -o" Middleware / Third_Party /FreeRTOS/Source/timers.o "

make: *** [TouchGFX / target / generated / subdir.mk: 33: TouchGFX / target / generated / TouchGFXGeneratedHAL.o] Error 1

make: *** Waiting for unfinished jobs ....

../TouchGFX/target/generated/TouchGFXConfiguration.cpp:17:10: fatal error: texts / TypedTextDatabase.hpp: No such file or directory

 #include <texts / TypedTextDatabase.hpp>

     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated.

make: *** [TouchGFX / target / generated / subdir.mk: 31: TouchGFX / target / generated / TouchGFXConfiguration.o] Error 1

../TouchGFX/target/generated/STM32DMA.cpp:20:10: fatal error: touchgfx / hal / OSWrappers.hpp: No such file or directory

 #include <touchgfx / hal / OSWrappers.hpp>

     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated.

make: *** [TouchGFX / target / generated / subdir.mk: 29: TouchGFX / target / generated / STM32DMA.o] Error 1

In file included from ../TouchGFX/target/STM32TouchController.cpp:20:0::

../TouchGFX/target/STM32TouchController.hpp:23:10: fatal error: platform / driver / touch / TouchController.hpp: No such file or directory

 #include <platform / driver / touch / TouchController.hpp>

     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated.

../TouchGFX/target/generated/OSWrappers.cpp:19:10: fatal error: touchgfx / hal / HAL.hpp: No such file or directory

 #include <touchgfx / hal / HAL.hpp>

     ^~~~~~~~~~~~~~~~~~~~~~

compilation terminated.

make: *** [TouchGFX / target / subdir.mk: 24: TouchGFX / target / STM32TouchController.o] Error 1

make: *** [TouchGFX / target / generated / subdir.mk: 27: TouchGFX / target / generated / OSWrappers.o] Error 1

In file included from ../TouchGFX/target/TouchGFXHAL.hpp:22:0,

         from ../TouchGFX/target/TouchGFXHAL.cpp:17:

../TouchGFX/target/generated/TouchGFXGeneratedHAL.hpp:20:10: fatal error: touchgfx/hal/HAL.hpp: No such file or directory

 #include <touchgfx / hal / HAL.hpp>

     ^~~~~~~~~~~~~~~~~~~~~~

compilation terminated.

make: *** [TouchGFX / target / subdir.mk: 28: TouchGFX / target / TouchGFXHAL.o] Error 1

../TouchGFX/target/TouchGFXGPIO.cpp:18:10: fatal error: touchgfx/hal/GPIO.hpp: No such file or directory

 #include <touchgfx / hal / GPIO.hpp>

     ^~~~~~~~~~~~~~~~~~~~~~~

compilation terminated.

make: *** [TouchGFX / target / subdir.mk: 26: TouchGFX / target / TouchGFXGPIO.o] Error 1

"make -j16 all" terminated with exit code 2. Build might be incomplete.

07:25:29 Build Failed. 15 errors, 0 warnings. (Took 922ms) 

MM..1
Super User
March 3, 2021

seems you skip one step 3

1.create new project in ide wizard select mcu or devboard

2.add touchgfx to config MX and generate first code base

3.in touchgfx folder open prepared template .touchgfx.part generate and close, then open created .touchgfx and generate without errors close

4.in IDE refresh and build project