cancel
Showing results for 
Search instead for 
Did you mean: 

Endless loop in TouchGFX core code

KTawo.751
Associate II

Hi,

I’m using the licenced version of TouchGFX V4.9.2 in my project. The code runs on STM32F777 and segger emBOS OS.

Occasionally the TouchGFX task falls into an endless loop, waiting for DMA_Queue::isFull() to return FALSE while in DMA_Interface::addToQueue() function.

The only way to get out of this state is to reboot the hardware.

I tried to the below two steps to get out of lock-up state without rebooting the system, but didn’t succeed and TouchGFX code goes to lock-up state again.

1-   disable DMA2D and LTDC interrupts and de-initialise them and then terminate the TochGFX task and de-initialise the LTCD

2-   to initialise DMA2D and LTDC peripherals a create the GFX task

Any idea why this is happening and if there is a way to get out of this state without system reboot.

Thanks

7 REPLIES 7
Martin KJELDSEN
Chief III

Hi,

It's been a while since i ran this version but i think that maybe we found a bug somewhere along the way where, if you were to place a textarea as the very last element in your view, something would happen to the semaphore protecting one of the framebuffers.

Can you verify?

/Martin

Martin KJELDSEN
Chief III

In other words, you could try upgrading your application to 4.12.3 and see if the issue is still there.

/Martin

KTawo.751
Associate II

Hi Marin,

Correct, I’ve a textarea which is the top most element of my view. The textarea is used as digital clock so the text gets updated every second and the rest of screen is almost static waiting for button events.

I found out TouchGFX V4.10.0 has similar issue so I implemented the recommended fix to check if it rectifies the issue on V4.9.3 too and let you know the results.

If problem still there then I’ll upgrade to V4.12.3.

Thanks, Khalil

KTawo.751
Associate II

The suggested fix in the "TouchGFX Known Issues" didn't work on V4.9.3 then I upgraded to V4.12.3 still the same problem. TouchGFX core stays in addToQueue() function waiting for Queue to be available.

Attached is the screenshot of the Keil-IDE screen while in this state which contains:

  • ST32 Core faults screen,
  • Call stack screen
  • DMA2D status screen
  • Watch screen containing FrameBufferSemaphore (CSema) information

0690X00000ArTuYQAV.jpg

Martin KJELDSEN
Chief III

Hi,

Strange, we fixed the issue for 4.12.0 specifically. I will try to verify! In the meantime, could you change the z-order of your textarea so that it is not the topmost element?

/Martin

KTawo.751
Associate II

Hi,

The z-order change didn’t fix the issue either.

When application in the main screen the only object that invalidates (redraws) regularly is the digital clock's textarea, maybe that’s why z-order change didn’t help.

Khalil

KTawo.751
Associate II

Hi Martin,

While you are verifying the issue, is there a way to reset the TouchGFX core without rebooting the h/w?

I tried terminating the GUITask, resetting LDTC and DMA2D peripherals and interrupts, then recreating the task and enabling the interrupts. But it didn’t help as the “dma�? object’s scope is global so the core goes into the same hang state.

Thanks, Khalil