cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX DSI video mode issues

LBaga.1
Associate II

Hi ST community,

as others in the forum, I'm trying to work with TouchGFX on a display in video mode.

I started form the LCD_DSI_VideoMode_SingleBuffer with the purpose to have the Video Mode working on another display (based on st7701s controller). This was easy done.

Before trying the new display with TouchGFX, I want to make an intermediate step and have the DSI Video Mode working with TouchGFX with the STM32F469I-DISCO board original display.

I'm testing it with this simple screen:

0693W000008xjESQAY.png 

I get an image which has pixel rows shifted a few pixels on the right with respect to the previous one.

0693W000008xjFpQAI.png 

I suspected some sort of LCD synchronization problems, but if I fill the framebuffer with some "for" loops with color values, I get the expected pattern (no skew). This confirms that the LTDC and the DSI Host in video mode seems to be correctly set-up (same setting as same settings as LCD_DSI_VideoMode_SingleBuffer).

If I look at the framebuffer with the debugger (memory view), It indeed contains "stripes" of colors, instead of having 4 rectangular regions. This confirm that is it not an issue from trasferring from framebuffer to display, but the framebuffer content itself is wrong from the beginning.

Note that colors are correct. I tried with other colors (not full red, blue or green) and I still get the stripes, but with the correct colors.

I 've finished my ideas on what to check...does anyone can figure out what could be the cause and suggest what to check?

I work with singleframe buffer at 0xC0000000 (800x480), rgb565, display size 800 x 480. LDC frequency set at 27,4 Mhz

Thanks in advance,

Luca

19 REPLIES 19

OK. Thanks! Now I get the expected screen image.

There are still a couple of minor issues:

  • sometimes after reset, I get a corrupted screen.
  • the last line of thr LCD shows random color.

Now I have to do my homework and understant the differences compared to my code.

FYI: I tested the DSI patterns on my project and they work there as well. I would conlcude that DSI host is correclty set-up.

My zip file is old and only my first testing, i recommend use new project and only inspire.

Hey LBaga.1, I am currently dealing with some issues that I am currently in communication with the vendor (using a new lcd with st7701s) but I am much more behind than your current progress and have a few questions regarding implementing the st7701s. I got the init sequence from the lcd vendor as well as implemented some generic commands to set-up the screen and I have my framebuffer pointing in my sdram but here is the issue if you have some sort of clarity for me:

I generated the project from TouchGFX Designer for the stm32f469i-disco and was using the otm8009a but due to not being able to use the ic I have had to swap to the st7701s and been trying to get it to work, I found the specific code within TouchGFX generated files (TouchGFXHAL.cpp, TouchGFXGeneratedHAL.cpp) that seems to be tailored to the otm8009a called commands related to the otm8009a's display ram such as CASET for region updating, etc. Are these functions causing me issues for the st7701s, how did you adjust TouchGFX to accept a ramless display?

Hello LBaga.1,

(sorry for my bad English)

I got the same problems.The values in framebuffer is not correct , picture shows not correct color and oblique lines.I tested my driver to show a picture without Touchgfx,its show the expected pattern.

Hi Zbobo.1,

the wrong data in the frame buffer (additional 32 pixels I have mentioned in my detailed analisys) are caused by the "+32" in the function below (from TouchGFXHAL.hpp file). The comment explains why they are there, but in DSI video modem they create the problem with the frame buffer.

TouchGFXHAL(touchgfx::DMA_Interface& dma, touchgfx::LCD& display, touchgfx::TouchController& tc, uint16_t width, uint16_t height) : TouchGFXGeneratedHAL(dma, display, tc, width + 32, height) /* Align to match 832 pixel for optimal DSI transfer */

remove that "+32" and you will get the right image...at least it worked for me.

TouchGFXHAL(touchgfx::DMA_Interface& dma, touchgfx::LCD& display, touchgfx::TouchController& tc, uint16_t width, uint16_t height) : TouchGFXGeneratedHAL(dma, display, tc, width, height)

I hope this help!

Luca

Hello JSime.1,

I haven't solved the same thing yet and for other engagement I temporarely stop the project.

Anyhow, I can briefly describe my approach:

  1. I created a "equivalent" of the otm8009a.c and otm8009a.h with the initialization functions for the LCD, based on the display manufacturer initialization sequence. I called them st7701s.c and st7701s.h.
  2. As the st7701s only uses the DSI video mode as it has no GRAM, I modified the example ....\STM32Cube_FW_F4_V1.25.2\Projects\STM32469I-Discovery\Examples\LCD_DSI\LCD_DSI_VideoMode_SingleBuffer to use the file created above. --> This worked smoothly. It will help you to validate your initialization phase.
  3. I wanted to make sure that was possible to run the TouchGFX in video mode. All examples are for DSI command mode. So I set it up to use the video mode, but still with the otm8009a. I got some trouble with diagonal patterns which I finally sorted out. See details above and solution posted as answer to Zbobo.1.
  4. replace the otm8009a with the st7701s files on the application created at item 3.

Now I'm stuck at step 4: despite it worked properly on the LCD_DSI_VideoMode_SingleBuffer, I didn't manage to sort this yet on the TouchGFX.

As far as I have understood, you can remove all calls that refers to region updates, because they are not used/nor called.

In my case, I don't think is a problem of the TouchGFX itself, because after the LCDT and the DSI HOST initialization, before the TouchGFX task is called, I should be able to use the DSI test patterns, like:

HAL_DSI_PatternGeneratorStart(&hdsi, 0, 0)

but they are not working. (they do work on the LCD_DSI_VideoMode_SingleBuffer example).

I think I have some problems with the LCDT and the DSI HOST initialization sequence, but i haven't figure out why...yet =)

I hope this can help at least to make some progress... If you are successful with step 4...please share the solution. I will do the same if I get any progress.

Ciao,

Luca

Sstev.21
Associate

Maybe you don't I can't explain well, did you tested the PNG format? I have read a similar issue for the Airtel TV app. Try to set image orientation, don't change the screen orientation. I hope it works for you.

Hey LBaga.1,

Just wanted to give you an update, I approached the single buffer example and made sure the init sequence I got from the LCD vendor was correct (it was), I ended up creating a custom project based around the example in CubeMX and within the TouchGFX Generator set-up chose Parallel RGB (LTDC) and LTDC trigger instead of custom, the TouchGFX task gets writing to the screen however it writes the expected framebuffer to the first and second quadrant of my screen and the colours are off. Currently trying to solve these issues using the OTM8009a screen before I move to the ST7701s and solve the next set of issues.

I will post a better explanation as a new question in the forum and link to that in this reply or a new reply for you and others to view after I have posted it.

Good luck,

Joe.

VMala.1
Associate II

Luca,

I have a display that is doing the same thing! what was the solution, please?

-Van

Luca,

my display does the same thing. did you find a solution?

-Van