2021-01-20 09:28 AM
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:
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?
2021-01-21 08:38 AM
I set the timer to 4 seconds period - the result absolutely the same.....
2021-01-21 08:46 AM
also can't understand next in documentation: HAL vs TouchGFXHal
2021-01-21 08:52 AM
Is breakpoint stopped here ?
2021-01-21 08:54 AM
Yes, of course. I put also LED blinking here. so everything with timer fine
2021-01-21 09:38 AM
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.
2021-01-21 11:30 AM
Really i dont understand what link between screen initialization or sending data to it and calling flushbuffer....
2021-01-21 12:41 PM
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)
2021-01-22 12:24 AM
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
2021-01-22 06:56 AM
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 ...
2021-01-22 09:25 AM
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