cancel
Showing results for 
Search instead for 
Did you mean: 

LTDC Rotation 180 degres

Hamady
Associate III

Hello i'm using touch GFX with STM32H7RS-DK And i need to evaluate for a future product if display rotation is possible.

I tried this implementation but drawCacheEnabled isn't reconize by software so i removed it and the widget is working but the screen flicker betwen 0 and 180° . Is there a more actual way of rotate a screen . 

    // Force redrawing entire screen
    virtual void draw(Rect& rect)
    {
        if (drawCacheEnabled)
        {
            // Invalidate entire screen instead of requested rect.
            Rect r(0, 0, HAL::DISPLAY_WIDTH, HAL::DISPLAY_HEIGHT);
            Application::draw(r);
        }
        else
        {
            // Use original rect if we are *actually* drawing and not just invalidating.
            Application::draw(rect);
        }
    }

 Thanks

1 REPLY 1
LouisB
ST Employee

Hello @Hamady,


We do not support 180 rotation, usually for a product, the whole screen itself is rotated. Also some screen support rotation by setting some bits.
It's possible to achieve rotation, by rotating a copy of the framebuffer that you then send to the screen. You can use the GPU to do that with better performances.

May I ask, how did you come up with this code, I dont see how you can have a rotation with just that ?

BR,

Louis BOUDO
ST Software Engineer | TouchGFX