Skip to main content
Gom
Associate II
March 15, 2021
Question

UI stuck in takeFrameBufferSemaphore

  • March 15, 2021
  • 69 replies
  • 29872 views

Hi

When switching between screens fast, my UI always ends up freezing. Debugging reveals that it waits forever, waiting for the frame buffer semaphore.

Here is the call stack:

0693W000008ww2rQAA.png 

Inspecting other running tasks shows nothing wrong. Only the graphics task should touch the frame buffer semaphore, right? So it should never deadlock?

Environment:

  • IDE: Atollic
  • RTOS: FreeRTOS
  • TouchGFX: 4.16
  • OS: Windows
This topic has been closed for replies.

69 replies

Martin KJELDSEN
Principal III
April 12, 2021

Thanks for the detailed info!

vtunr
Associate II
April 15, 2021

Hi @Martin KJELDSEN​,

 Any update on that ? Let me know if you need more information or test I can do.

Thanks

vtunr
Associate II
April 23, 2021

Hi @Martin KJELDSEN​,

Still no updates on this issue ? It's been more than a month after opening this issue, and it is not progressing. Is there another channel for support than this forum ?

Thanks,

Tony 

Martin KJELDSEN
Principal III
April 27, 2021

Hey Tony, sorry man. Let me add @Romain DIELEMAN​ to this thread. We're a bit short on support effort these days. You're constantly on my mind (along with a few others).

You say you're using Atollic - Did you hack together this project yourself? What are the priorities for the threads and interrupts? We don't officially support the old Atollic IDE.

If this is automatically generated i'm not expecting this to be the issue. But it does look like there's a race condition- Just to be clear - Can you share your project? I think i'll need to look at some code at this point

/Martin

vtunr
Associate II
April 29, 2021

Hi @Martin KJELDSEN​ 

So we're using Atollic because we started the project when it was the begining of the CubeIDE and the full integration of TouchGFX in CubeMX. Then, we kept TouchGFX up to date.

For source sharing, can we switch to email to discuss that ?

Thanks,

Tony

Martin KJELDSEN
Principal III
June 8, 2021

Just an update for everyone following the thread:

From the stack trace it is clear that touchgfx gets stuck while drawing a series of glyphs. This is something we've fixed in more recent versions of TouchGFX. I'm following this avenue of thought with OP by email.

/Martin

AKG
Associate II
June 21, 2021

Hi @Martin KJELDSEN​  : We have a similar issue in our display.

Can you please provide some details about the solution for this problem ?

You say that that touchgfx gets stuck while drawing a series of glyps and it is being fixed in more recent versions. Can you please say in which version this is being fixed ?

Martin KJELDSEN
Principal III
June 21, 2021

Which version are you using? There was a bug, once, but we're talking way back, where lockFrameBuffer() would cause a deadlock if a glyph was the last thing to be transferred by DMA2D.

/Martin

AKG
Associate II
June 21, 2021

Hi @Martin KJELDSEN​ : Thanks for your quick response. We are using touchgfx version 4.16. We have a similar problem where the method takeFrameBufferSemaphore() waits forever.

Martin KJELDSEN
Principal III
June 21, 2021

No problem. Okay, it should have been fixed there. Are you able to share your project in any way? In the middle of 4.17.0 release testing, so won't have much time this week, but - This is the second person who's reported this, so i should take some time to investigate this properly if i can re-construct the issue here at my desk.

AKG
Associate II
June 21, 2021

@Martin KJELDSEN​ : Sorry for not providing complete details. We are using embOS. So takeFrameBufferSemaphore() is OS-specific. Could it be that the OSWrappers is not properly implemented ? Should I quickly share you my OSwrappers.cpp ?

Our project is very huge. So, I will see how can I share you my project.

Martin KJELDSEN
Principal III
June 21, 2021

Did you create the project usign the generator? The generator generates a CMSIS OS specific OS-driver (cmsis v1 or v2, depending on what you selected). Which should work with fine with embOS.

I'm more thinking it's an internal problem with us, but i'm investigating (see the above post - I tagged you - for details and some home-work for you, if you have the time).

AKG
Associate II
June 21, 2021

@Martin KJELDSEN​ Thanks for your reply. We started this project long back with touchgfx version 4.9.3. If I am not wrong, there was no generator at that time. So our project was created without using the generator. Thereafter on every newer touhgfx version, we have only tried to upgrade touchgfx.

I can create a project using generator and compare the OSWrapper implementation.

Also I will try out the task you mentioned above. I will get back to you as soon I have any result.

Luca G.
Associate III
June 21, 2021

I have the same issue! I'm using TouchGFX Generator 4.16.1, I have created the project with STM32CubeMX (6.2.1) and I'm using STM32CubeIDE (1.6.1).

In my case I do not use OS.

I awaintg any news! I am not able to go on with the project.

Luca G

Martin KJELDSEN
Principal III
June 22, 2021

I need details of your hardware setup. Thanks

JLee.32
Associate III
July 22, 2021

@Martin KJELDSEN​ 

Is this issue solved in 4.17.0? It seems I got the same issue. I upgraded TouchGFX from 4.13.0 to 4.17.0 yesterday. My UI ends up freezing, but it never happened for 4.13.0. Is there anything I can do if you are still interesting in this issue?

Ruslan Manianov
Associate
August 11, 2021

Hi. So is this problem still not resolved? I have got it after few month of developing GUI. I try fix it two days and i can't it. And what now? Other gui library?