cancel
Showing results for 
Search instead for 
Did you mean: 

Weird horizontal artifacts in touchGFX buttons

BWKidd
Senior

Hi Folks and Happy New Year!

I've been trying to track down a problem I'm having with my project for several months now. Essentially I'm getting these red-ish lines through portions of my buttons, but only when (I presume) they are drawn or redrawn - namely when the screen first loads, when they are pressed, or when as in this example, they have text drawn over them that updates. 

IMG_7199.JPEG

In the case of the above picture, I've been able to get the lines to appear more consistently by layering some text over top of some of the buttons and then updating that text with each tick where it says "Tick Counter: xxxx". I managed to luck out and have it appear on the "Cancel" of the cancel button this time, though it probably only happens about 1 out of 10 times when the screen loads.

These lines have been appearing pretty consistently throughout my development on the project, and they seem (though I'm still not completely sure) to be happening regardless of my application code. The reason I say this is that I've commented out large portions of my application code and had them still appear. Frustratingly, they are not consistent. I can do a build, have them appear, and then insert a trivial line of code (even a NOP), and then they will disappear, only to reappear again after I add a few more lines.

This really seems to point to some sort of issue where I'm writing off the edge of an array or something (it seems that parts of my frame buffer are getting inadvertently overwritten? But then why just buttons? And why does it still happen when I essentially remove my application code?) 

I've included my TOUCHGFXHAL code that has my driver code in it.

Details on my project:

MCU: STM32L496VGTN

Display: NHD-2.8-240320AF-CSXP-FT (ST7789 Controller) connected via FMC 16-bit parallel

External Flash: MT25QL128A using quad-spi with a custom loader

Firmware details: No RTOS (Bare Metal/super-loop)

Touch GFX Configuration:

BWKidd_0-1735835937379.png

 

Other possible helpful details:

  • My display has no TE line, so I'm updating it manually using a timer at 10Hz by calling Oswrappers::signalVSync(). I had this called in the timer callback function, but recently moved it into the main loop and the problem actually seemed to happen more consistently if anything.
  • I've confirmed that these artifacts are actually contained in the framebuffer, so its not some sort of electrical noise that's corrupting pixels as they're transmitted to the display.

Any tips, tricks, or advice towards debugging this issue would be greatly appreciated. You might say figuring this out has become my new year's resolution!

 

22 REPLIES 22
mathiasmarkussen
ST Employee

Yes, that is the setting I was referring to. You should ensure that DMA2D is enabled in your initialization code. The settings don't matter, TouchGFX will take care of this, as well as setting up transfers to the frame buffer.

You should not reconfigure DMA2D. If you want to use DMA to transfer data to the FMC, you should use plain DMA.

BWKidd
Senior

Ah, yes that fixed the issue with the screen only partially drawing. I'll get normal DMA setup for my FMC transfers. No artifacts either, for the moment.

BWKidd
Senior

Well, I should have tested the larger font size (Size 80, Verdana Bold) because that still has the problem I mentioned before:

BWKidd_0-1738343790305.png

When I disable ChromArt under the TouchGFX settings these weird character distortions go away.