cancel
Showing results for 
Search instead for 
Did you mean: 

Cube MX not generates lockDMAToFrontPorch(true);

EEuge
Senior

Hello!

I have old project. It has file TouchGFXGeneratedHAL.cpp, where I can see code

void TouchGFXGeneratedHAL::initialize()
{
    HAL::initialize();
 
    registerEventListener(*(Application::getInstance()));
    enableLCDControllerInterrupt();
    enableInterrupts();
    setFrameBufferStartAddresses((void*)0xD0000000, (void*)0xD0200000, (void*)0);
	
	    /*
     * Set whether the DMA transfers are locked to the TFT update cycle. If
     * locked, DMA transfer will not begin until the TFT controller has finished
     * updating the display. If not locked, DMA transfers will begin as soon as
     * possible. Default is true (DMA is locked with TFT).
     *
     * Setting to false to increase performance when using double buffering
     */
    lockDMAToFrontPorch(true);
}

I updated CubeMX and TouchGFXdesigner to last version, and I saw

void TouchGFXGeneratedHAL::initialize()
{
    HAL::initialize();
 
    registerEventListener(*(Application::getInstance()));
    enableLCDControllerInterrupt();
    enableInterrupts();
    setFrameBufferStartAddresses((void*)0xD0000000, (void*)0xD0200000, (void*)0);
	
}

String "lockDMAToFrontPorch(true);" lost.

And I see artifacts while widgeds moving.

A added string lockDMAToFrontPorch(true), artifacts disappeared.

But I need to put this string every time, I edit CubeMX project...

New version of TouchGFX not supports this option?

I found string "lockDMAToFrontPorch(false)" in file HALSDL2.cpp, but setting it to true has no effect.

Why?

3 REPLIES 3
MM..1
Chief II

Hi i see this too, but i mean this settings is for single buffering and in good double buffering is irelevant, then new remove it.

When you generate code with single buffer , yuo have this line back in code.

And i see artifacts too in new 4.15, then i stay use 4.13.

You can add this line to HAL file not generated

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.
 
    TouchGFXGeneratedHAL::initialize();
 
//add here
 
}

Romain DIELEMAN
ST Employee

Hi EEuge and MM.1,

Could you explain what artifacts you have seen with 4.15 ? Could you share some code or pictures ?

To try to replicate this issue could you tell us your two setups (which board, version of TouchGFX, STM32CubeProgrammer...) ?

/Romain

Smartembedded
Associate III

Hi Romain !

I have encountered the same issue with our STM32F750 using : CubeMX : 6.91., CubeIDE :1.13.1 & touchGFX : 4.22

The LockDMA call is not inserted, but artifacts are present ie. if using a slider to change to alpha value on a box or even moving a small image. Looking around the forum it should not be nessesary to call the lockDMAToFrontPorch(true); routine. And it should also be costly performance wise.

Could there other setting that is needed to get rid of the call ?

800x480 RGB565 :

void TouchGFXGeneratedHAL::initialize()
{
HAL::initialize();
registerEventListener(*(Application::getInstance()));
setFrameBufferStartAddresses((void*)0xC0000000, (void*)0xC00BB800, (void*)0);
}

/Jakob