cancel
Showing results for 
Search instead for 
Did you mean: 

How to configurate my custom project with TouchGFX engine and design for STM32F4 (I am use RTOS) with LCD controller SSD1963 over 8080 interface (i am not use DMA)?

EHay.1
Associate III

My config:

  • I am use FSMC for communication over intel 8080 without DMA with SSD1963 LCD driver;
  • My custom display 100x100 pixels;
  • I am not use touch;
  • I am use internal framebuffer
  • I am configure my project with as: https://support.touchgfx.com/docs/development/touchgfx-hal-development/scenarios/scenarios-fmc/
  • generate simple design in TouchGFX Designer (box 100x100 pixels with RED color)
  • create one frame buffer 100x100 pixels 16bpp
  • add code for handling tearing and synchronization with RTOS

TouchGFXHAL::flushFrameBuffer(const touchgfx::Rect& rect) never call... (I am use TouchGFX gen. 4.14 and 4.13 designer)

Can you describe steps for run my simple design?

My GUI Task in freertos:

void TouchGFXHAL::taskEntry()
{
    enableLCDControllerInterrupt();
    enableInterrupts();
    os_inited = true;
    OSWrappers::waitForVSync();
    backPorchExited();
 
    for (;;)
    {
        OSWrappers::waitForVSync();
        backPorchExited();
    }
}

and

    virtual void backPorchExited()
    {
        swapFrameBuffers();
        tick();
    }

7 REPLIES 7
Alexandre RENOUX
Principal

Hello,

Is FlushFramebuffer called at least once ?

If nothing is written in the Framebuffer, the flushFramebuffer will not be called. Are you sure you draw something in your framebuffer ?

Please have a look at the L496G-DISCO board Application Template available in TouchGFX Designer, this implements the FMC display interface.

/Alexandre

No, flush framebuffer never call. I think need add call manually flush framebuffer in:

    virtual void backPorchExited()
    {
        //swapFrameBuffers();
        TouchGFXHAL::flushFrameBuffer(const touchgfx::Rect& rect);
        tick();
    }
void TouchGFX_TearingHandler(uint8_t PinStatus)
{
    if (os_inited)
    {
        if (PinStatus) /* Raising edge : entering Active Area */
        {
            HAL::getInstance()->vSync();
            OSWrappers::signalVSync();
            // Swap frame buffers immediately instead of waiting for the task to be scheduled in.
            // Note: task will also swap when it wakes up, but that operation is guarded and will not have
            // any effect if already swapped.
            //HAL::getInstance()->swapFrameBuffers();
        }
        else /* Falling edge : exiting active area */
        {
            HAL::getInstance()->frontPorchEntered();
        }
    }
}

This issue recommended use endFrame() for call flush. But I not understand where insert endFrame()...

https://community.st.com/s/question/0D50X0000BmnXT3/howto-trigger-flushframebufferrect

Example for redefine virtual function flush:

https://community.st.com/s/question/0D53W000004KWCjSAO/how-to-configura-touchgfx-for-stm32f407zgt6-with-cubemx

and

https://community.st.com/s/question/0D50X0000ADDsIiSQL/stm32f4touchgfxlcd-with-8080-parallel-interface

this code stoped in point -> No source available for "touchgfx::HAL::lockFrameBuffer() at 0x8009984"

0693W000002lXFzQAM.png

function lockFrameBuffer() realised in static library touchgfx or need redefine this?

lockFrameBuffer() is a function from the lib. It does not need to be redefined.

lockFrameBuffer() calls OSWrappers::takeFrameBufferSemaphore();

So please check your OSWrappers.cpp file and monitor the state of your semaphores.

/Alexandre

If i give semaphore with some period ( OSWrappers::giveFrameBufferSemaphore(); or OSWrappers::giveFrameBufferSemaphoreFromISR(); ). The program remains in the lockFrameBuffer();

If i am redefine lockFrameBuffer(); in TouchGFXHAL module as:

uint16_t* TouchGFXHAL::lockFrameBuffer(void)
{
	return getTFTFrameBuffer();
}

Then program escape from lockFrameBuffer. Where is the configuration error? I can share my project over github.

EHay.1
Associate III

Please check my project.

EHay.1
Associate III

Hello,

I fixed this issue. I configured my project with "custom" graphic accelerator. But I changed configuration to DMA2D and my project successfully work.

Best Regards!

/Evgeny