Skip to main content
Luca1
Associate III
June 21, 2020
Question

Basic TouchGFX application don't work

  • June 21, 2020
  • 12 replies
  • 4940 views

Hi to all!

I'm not able to run a very basic (a black screen) TouchGFX application on my hardware. I have follow the TouchGFX documentation and the STM32L496G-DISCO application example, but i wasn't lucky..

In particular I never reach the breakpoint that i put in the TouchGFXHAL::flushFrameBuffer(const touchgfx::Rect& rect) method. Also, if I suspend the debug, i see that the application stack arrive at the method touchgfx::HAL::lockFrameBuffer().

I have modified only the TouchGFXHAL class, in attatched there are this class files, following the documentation and the example metioned above, but maybe i miss something.

Please someone can give me some help?

This topic has been closed for replies.

12 replies

Martin KJELDSEN
Principal III
June 21, 2020

Are you hitting breakpoints in setupScreen() of your views? Are you hitting breakpoints in your LTDC/DSI interrupt handlers (If not, then the application won't get ticked, and flushFB will never get called) ?

Luca1
Luca1Author
Associate III
June 22, 2020

Hi Martin thank you so much for the reply!

Yes i hit the breakpoint in my setupScreen of my view (../TouchGFX/gui/src/screen1_screen/Screen1View.cpp), but this method don't contains nothing, it has a empty body. I also hit the breakpoint in the Screen1ViewBase::Screen1ViewBase() method, this method contains the ui box setting (position, color and an add method).

I don't understand what you mean for LTDC/DSI interrupt handlers. If you refer to call the OSWrappers::signalVSync(), yes, i have done a timer interrupt that fire at about 40Hz, and when it fire I hit the breakpoint placed on the OSWrappers::signalVSync() method.

Martin KJELDSEN
Principal III
June 22, 2020

Just to be sure - You're working with STM32L496G-DISCO? Maybe you could get some inspiration from the L4R9I-DISCO application template from the designer. What struct me is that you're signaling signalVsync() using a timer instead of using the signals from the display controller. In the L4R9 AT we're signaling signalVSync() using

void HAL_DSI_TearingEffectCallback(DSI_HandleTypeDef* hdsi)

/Martin

Luca1
Luca1Author
Associate III
June 22, 2020

No, i'm working with a Nucleo-F767ZI and a display with RA8876 controller, this display.

I referred tho the STM32L496G-DISCO because this board have an application example suggest by the documentation of TouchGFX.

In my case there are an interrupt that signal the Teating Effect, but I don't use this at this moment because after this interrupt fire, I need to clear the interrupt flag.

I can clear this flag after the framebuffer is flushed, and at this moment i don't know how to do this. So i used an timer interrupt to simulate the Tearing Effect, as suggest by TouchGFX documentation.

NB, i know the limit of my display using the Nucleo F767ZI!

Martin KJELDSEN
Principal III
June 22, 2020

Ah, that makes more sense.

Did you try debugging? What's the application doing when you pause it? f you're breaking inside your screens then the timer is doing its job

/Martin

Luca1
Luca1Author
Associate III
June 22, 2020

Yes i try to debugging! But is not simple to follow the code.

This is the call stack of the application when i pause it:

0693W000001rBAlQAM.png

Martin KJELDSEN
Principal III
June 22, 2020

This is a 1bpp application? (LCD1).

Looks like its blocked trying to take a lock the farmebuffer.

Luca1
Luca1Author
Associate III
June 22, 2020

Yes this is 1bpp application. 

I recognize that I have done a mistake to buy this display. I bought it without know anything about the displays. After reading the TouchGFX documentation I realized that this display have a big resolution and a wrong interface to be usable with my Nucleo-F767ZI board. 

However I can change the interface from serial (at this moment the display use the SPI) to parallel (I need to study what is the best choise between 8080 and 6800 parallel interface) in this way i can solve one bottleneck, but I need an external hardware (sdramm shield) to manage the full colordepth of this display. 

For this reason, at the moment I use 1bpp GUI. In this way I can use two framebuffer with this colordepth and send the framebuffer at 60Hz framerate (I set-up the SPI to run at 41Mbit/s). 

My goal is to learn and understand how to design and run an application GUI for the microcontroller, so for now 1bpp GUI it's sufficient to reach my goal.

If I terminate this first step, I will change the display interface from serial to parallel and I will design an application at 6bpp, because this is the maximum colordepth that I can use with my Nucleo-F767ZI board.

Yes it seem blocked but i don't know why.. Can you tell me if I miss to implements something or maybe i have done some wrong setting?

Luca1
Luca1Author
Associate III
June 23, 2020

Any help?

Martin KJELDSEN
Principal III
June 23, 2020

It's not easy to tell unless i have your hardware. My first guess was that you've taken the lock in a custom widget without releasing it again, but i doubt that's it.

Are you calling HAL::getInstance()->lockFrameBuffer() at any point in time?

/Martin

Luca1
Luca1Author
Associate III
June 23, 2020

Hi Martin!

I know that it's not easy to tell me something, but i don't know how to search a solution!

I think that is not an hardware problem because i call the lcd controller routine only in the initialize method. I think, but maybe I can wrong, that is a software problem, maybe a wrong setting in the project.

It's possible to have a very basic workng project template that don't depend of the LCD hardware or microcontroller? Or if it's not possible, what steps I do (like write or override some methods) for having a working project?

I have searched HAL::getInstance()->lockFrameBuffer(), but I don't see any call to this function:

0693W000001rHuQQAU.png