cancel
Showing results for 
Search instead for 
Did you mean: 

STM32IDE+TouchGFX can't start.

Sergii Volchenko
Associate III

I try to connect LCD by SPI to Nucleo-767 and TouchGFX.

LCD screen work perfect and I could draw on it without a problem, but I stuck with TouchGFX.

I found that void TouchGFXHAL::flushFrameBuffer never call.

Check this video - https://youtu.be/1UhEx7E_dH0

What I did:

  1. New project for my board
  2. Make timer for VSync each 15ms
  3. Add TouchGFX Generator package
  4. Add CRC
  5. In TouchGFX settings set size 320x240 and RGB888.
  6. Open TouchGFX Designer, add button, and generate code.
  7. In code add start & callback for timer and call function for generate tick
  8. add switch on led on board.

LED doesn't light.

Of course, I checked that timer callback works, led works.

In debug mode I found that app stuck in lockFrameBuffer function.

What I did wrong?

24 REPLIES 24

I set the timer to 4 seconds period - the result absolutely the same.....

Sergii Volchenko
Associate III

also can't understand next in documentation: HAL vs TouchGFXHal0693W000007CDdwQAG.png

Is breakpoint stopped here ?

Yes, of course. I put also LED blinking here. so everything with timer fine

MM..1
Chief II

You dont show any part of display code , then i cant help. Try inspire run TouchGFX and create project for G071 , that is noos display.

For example primary func here

void TouchGFXHAL::initialize()
{
    // Calling parent implementation of initialize().
    //
    // To overwrite the generated implementation, omit call to parent function
    // and implemented needed functionality here.
    // Please note, HAL::initialize() must be called to initialize the framework.
 
    /* Initializing Display and SerialFlash drivers */
    MB1642BDisplayDriver_Init();
    DataReader_Init();
 
    /* Prepares Display for operation */
    MB1642BDisplayDriver_DisplayReset();
    MB1642BDisplayDriver_DisplayInit();
 
    /* Initialize TouchGFX Engine */
    TouchGFXGeneratedHAL::initialize();
    setButtonController(&bc);
 
    /* Wait for first VSync from display */
    touchgfx::OSWrappers::waitForVSync();
 
    /* Render first frame, so there is valid date in the displays GRAM */
    HAL::getInstance()->backPorchExited();
 
    /* GRAM has been filled, turn on display to show content of GRAM */
    MB1642BDisplayDriver_DisplayOn();
    touchgfx::OSWrappers::signalRenderingDone();
}
 

Simply when you in Cube select CUSTOM drivers for touch , then you need write this drivers.

Really i dont understand what ​link between screen initialization or sending data to it and calling flushbuffer....​

MM..1
Chief II

Link is simple when init is bad , code dont arive to flushbuffer for example TouchGFX 4.16.0 D-Cache flush causes HardFault... (st.com)

If you checked my original message or video you see that I didn't not init LCD at all. So in code no work with LCD (init, send data or TE receive). Also I show dabug pause stacktrace. It stops not in hardfault but on lock framebuffer

Try use this as your init

void TouchGFXHAL::initialize()
{
    // Calling parent implementation of initialize().
    //
    // To overwrite the generated implementation, omit call to parent function
    // and implemented needed functionality here.
    // Please note, HAL::initialize() must be called to initialize the framework.
 
 
    /* Initialize TouchGFX Engine */
    TouchGFXGeneratedHAL::initialize();
 
    /* Wait for first VSync from display */
    touchgfx::OSWrappers::waitForVSync();
 
    /* Render first frame, so there is valid date in the displays GRAM */
    HAL::getInstance()->backPorchExited();
 
    touchgfx::OSWrappers::signalRenderingDone();
}

and not pause your code, better is place breakpoint ...

Sergii Volchenko
Associate III

All works as expected....

::initialize called from main.c, after that go inside waitForVSync, timer at this moment generate tick, and app stuck on this

0693W000007C6MZQA0.png