cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX upgrade (4.24.2 -> 4.25.0) broke screen

jchernus-fikst
Associate III

Hi!

I am confounded by a problem I've encountered when migrating to TouchGFX 4.25.0. The following change is being made by the auto-generated code in TouchGFXGeneratedHal.cpp:

jchernusfikst_0-1741643540809.png

When that change is included, my FW will result in a black screen. However, when I revert it back, the screen displays it's GUI just fine.

 

You might say, "well, that function must be returning false and you're entering the conditional and hanging in the while loop," which I agree is the mostly likely answer. However, any time I try to debug it - the function returns true, the conditional is skipped over, and the screen is still black. 

The following breakpoint will never be hit (it's my only breakpoint):

jchernusfikst_1-1741643764558.png

What am I missing? I feel like I'm going crazy.

 

Thanks,

Julia

2 REPLIES 2
GaetanGodart
ST Employee

Hello @jchernus-fikst ,

 


When that change is included, my FW will result in a black screen. However, when I revert it back, the screen displays it's GUI just fine.


Just to be clear, this is the only change between the working project and the non working project?

When you debug, you say that you never reach the while(1); but if you stop the application, does it looks normal or do you end up in another infinite loop somewhere else?

Can you share your project or a simplified version of your project where the issue happens?

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)
lbell
Associate

To add to this topic, I work with Julia and have been testing this issue. With the new generated version of TouchGFXGeneratedHAL::Initialize() in TouchGFXGenertedHAL.cpp, the screen is appearing black.

void TouchGFXGeneratedHAL::initialize()
{
    HAL::initialize();
    registerEventListener(*(Application::getInstance()));
    registerTaskDelayFunction(&OSWrappers::taskDelay);
    if (!setFrameRefreshStrategy(HAL::REFRESH_STRATEGY_OPTIM_SINGLE_BUFFER_TFT_CTRL))
    {
        while (1);
    }
    setFrameBufferStartAddresses((void*)0xC0000000, (void*)0, (void*)0);
}

In my testing, I am able to replace the snippet that Julia highlights with code that I believe to be functionally equivalent, and make no other code changes, and the screen displays as normal.

void TouchGFXGeneratedHAL::initialize()
{
    HAL::initialize();
    registerEventListener(*(Application::getInstance()));
    registerTaskDelayFunction(&OSWrappers::taskDelay);
    bool retval = setFrameRefreshStrategy(HAL::REFRESH_STRATEGY_OPTIM_SINGLE_BUFFER_TFT_CTRL);
    if (!retval)
    {
        while (1);
    }
    //if (!setFrameRefreshStrategy(HAL::REFRESH_STRATEGY_OPTIM_SINGLE_BUFFER_TFT_CTRL))
    //{
    //    while (1);
    //}
    setFrameBufferStartAddresses((void*)0xC0000000, (void*)0, (void*)0);
}

 I have verified that in all tests in either scenario that setFrameRefreshStrategy is returning true. After executing this function, the code seemingly executes as normal, with program entering the main RTOS control loop and not getting stuck at any assert or infinite loop catch statement. I will look into the possibility of creating a simplified project to share, but this project contains proprietary information, so it could take a bit of work.

Thank you,
Lauren