cancel
Showing results for 
Search instead for 
Did you mean: 

Question about wrong behavior at TouchGFX

Jkim.6
Associate II

Hi st community members,

I'm having trouble when I'm porting DSI display and also integrating it into TouchGFX framework. Please let me know if you can point me out some clues about this.

1. First, I started to do porting the DSI display(24bit color), by just setting a framebuffer connected to a buffer in internal SRAM(global array). It was finally succeeded as below, the content is RGB pattern what I generated by couple of for loops to fill the framebuffers.

In this case, I didn't activated TouchGFX(MX_TouchGFX_Init).

0693W000007EKegQAG.jpg2. As I saw successful porting of my DSI display, I started to activate TouchGFX framework

- activated MX_TouchGFX_Init and relevant codes.

- setup TouchGFX configuration in ioc file of STM32CubeIDE tool

- declared framebuffer as buffer allocation and set it also as LTDC framebuffer, by externing the array in main.c file

But what I see in this case is, something wrong.

- My display doesn't show the buffer correctly.

- It seems like it is something stretched than it's original size.

- It seems like one black(or empty) line is inserted every line after one red line.

0693W000007EKelQAG.jpgIs there anyone who has this kind of experience before?

I don't really know where to start my debugging in this kind of situation.

For your information, let me add my relevant configuration as below.

<TouchGFX configuration in ioc file>

0693W000007EKmLQAW.png<MX_LTDC_INIT() function in main.c file>

0693W000007EKmQQAW.png<TouchGFXGeneratedHAL.cpp file - for buffer declaration point>

0693W000007EKmVQAW.png 

Thanks in advance.

8 REPLIES 8
Mon2
Senior III

A suggestion while waiting for other replies is to run TouchGFX first -> select one of the ST kits which feature a native MIPI DSI port and display. Create a quick GUI -> simulate that it works ok. A simple touch button or similar should be ok.

Then proceed to import this finished project into the STM32CubeMX tools. If all goes well, the compiled STM32CubeMX project (that was imported) should continue to work on the selected kit.

Then review the details of this source code and configurations.

There is a lot that can break and a single issue can consume days / weeks of debugging time. Been there.

Share more details on the kit you have. Are you using a STM32 processor with MIPI on the CPU?

We will be heavy into similar research very soon but our plans are to use the Solomon parallel to MIPI bridge for a number of reasons. This way, we can make use of STM32 wizard generated code that will perform 99% of our required homework. Much easier to deploy in our opinion.

MM..1
Chief II

I see primary trouble , that you set Custom drivers. When you use DSI with full framebuffer, you need set LTDC not Custom.

Thanks for your reply, Mon2. I agree with your suggestion and will check it one by one as you suggested.

I am developing custom board kit based on STM32L4R9ZI processor. It has MIPI on the CPU, of course.

We actually started our work from STM32L4R9I EVAL board from ST's, and it also worked correctly with its built-in round type display.

Thanks for your experienced reply, MM..1.

Actually it was the point I didn't consider at all before.

I will try to change the Display Interface from Custom to Parallel RGB(LTDC) as you suggested, and let you know about the result.

Hi MM..1,

I tried your suggestion, but there was no change.

It seems it makes changes on TouchGFXGeneratedHAL.cpp side, such as lcd_int_active_line/lcd_int_porch_line and new callback as 'HAL_LTDC_LineEventCallback'. But it seems this callback is never called. Do we need to setup additional configuration to make this callback work?

Code generated from IDE MX isnt ready for use, you need make changes start driver unreset disp add task usw.

As first you need comment start RTOS in main and place before main while your RGB test code, then make all changes to LCD work. After this remove and start rtos.

Jkim.6
Associate II

For whom who will need this information later, let me update on this.

I finally needed two changes to correctly display my TouchGFX resources.

  1. Set Display Interface from Custom to Parallel RGB(LTDC) as MM..1 mentioned.(Thanks again MM..1 for mentioning it ! )
  2. Set Correct Framebuffer Width in TouchGFXHAL.cpp file.

As I was using the original version from ​STM32L4R9I EVAL board, it was defined based on GFXMMU dependent buffer width(3072/2).

The definition goes like BSP_LCD_IMAGE_WIDTH -> GUI_FRAME_BUFFER_WIDTH -> FRAME_BUFFER_WIDTH, finally.

After correcting the width as the one considering DMA2D transfer width, I can see outputs from TouchGFX delivered by DMA2D finally.

Great to hear that it works 👍, it is true that the L4R9 eval application template has a different approach due to the round display I did not think of that.

/Romain