Skip to main content
Kasun Dinesh
Associate III
February 16, 2021
Question

Weird glitch comes periodically

  • February 16, 2021
  • 11 replies
  • 2722 views

Hi,

Recently, I started getting a wired glitch on the LCD periodically. I m using touchGFX 4.15 and CUbeIDE 1.5. After commenting some code relevant to the UI, Glitch doesn't comes. Any one have an idea what might cause this? Video is attached

https://www.youtube.com/watch?v=ghRrd-VNGKc

Thanks a lot.

This topic has been closed for replies.

11 replies

Romain DIELEMAN
ST Employee
February 16, 2021

Hi,

Are you using a custom hardware or a ST development kit ? Did you start your project from an application template available from TouchGFX Designer ?

/Romain

Romain DIELEMAN
ST Employee
February 16, 2021

Does this glitch happen only with this UI or also with the other available UI templates ?

Kasun Dinesh
Associate III
February 16, 2021

Hi, thanks for your quick reply. I m using custom PCB but same components in STM32H750. So i can say its H750 dev kit. But i m using a different screen (800x480). I got the touchgfx generated project for h750 cubeide and developed from there. Glitch happens every other screens as well. I did more toubleshooting and found out that, if i commented a variable defined in the model, glitch dosent happens.

This is the specific section in my model

protected:
 
 ModelListener* modelListener;
 
 
 
// HomeScreenRuntimeData homeScreenRuntimeData;

Kasun Dinesh
Associate III
February 24, 2021

Does any one got any ideas why this happens? Help is much appreciated. We are stuck in production due to this glitch.

Thanks in advance.

N. SANTINI
ST Employee
February 26, 2021

Hi,

H7 MCU means Cortex-M7 which means background optimizations such as instruction re-ordering, speculative accesses.

There are chances that these glitches are due to a wrong Memory Protection Unit (MPU) configuration.

The MPU allows to disable the Cortex-M7 optimizations, if the configuration provided in the Application Templates are fine for most cases they may not be on custom board, notably on external memories.

The consequences of a wrong MPU configuration goes from wrong data read (leading to display glitches for example) to hardfault...

Please have a look a the following MooC : https://www.st.com/content/st_com/en/support/learning/stm32-education/stm32-moocs/STM32_MPU_tips.html

As well as the following application note : https://www.st.com/resource/en/application_note/dm00272912-managing-memory-protection-unit-in-stm32-mcus-stmicroelectronics.pdf

To summarize you need to disable accesses to all addressable external memories (even not connected ones) and then define an area for each connected one taking care of how many masters can access the memory, if code can be executed or not, etc.

Best regards,

Nicolas

Kasun Dinesh
Associate III
February 28, 2021

Hi Nicolas,

Thanks for your reply. This is my MPU configuration.

This is my memory definition.

0693W000007ZgDAQA0.png

MEMORY
 
{
 
 DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
 
 ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
 
 RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
 
 RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
 
 RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
 
 SDRAM (xrw) : ORIGIN = 0xD0000000, LENGTH = 8M
 
 ENV_VARIABLES (xrw) : ORIGIN = 0x90000000, LENGTH = 8K
 
 APPLICATION_FLASH (xrw) : ORIGIN = 0x90002000, LENGTH = 2040K
 
 APPLICATION_ASSETS_FLASH (r) : ORIGIN = 0x90200000, LENGTH = 126M
 
 BOOTLOADER (xrw) : ORIGIN = 0x08000000, LENGTH = 128k
 
}

Can you help me out to figure this out. Because I dont have much knowledge in MPU.

Thanks alot

Michael K
Senior III
March 11, 2021

Hi, I had this issue and I solved it by reducing the LCD-TFT clock rate. In my case (using an F769I-Disco) I changed it from 41.7MHz to 32MHz. If your UI slows down, make sure your optimizations are turned on. Good luck.

(As a matter of fact, the 41.7MHz came from the 3.0.0 F769 application template, and 32MHz came from the 3.0.2 template)

Embedded UI/UX Consulting: cadenza.design