Skip to main content
mikkel nielsen
Associate II
Jul 31, 2018 10:01 AM UTC
Question

changes the orientation on the board

i'm using a stm32f429 and i would like to now is it possible to turn the screen from vertical to horizontal.

    This topic has been closed for replies.

    6 replies

    Tesla DeLorean
    Guru
    Aug 8, 2018 3:56 PM UTC

    If there is not a SWAP or ORIENTATION setting in your software, you can change the way you paint into your frame buffer.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    mikkel nielsen
    Associate II
    Aug 13, 2018 10:01 AM UTC

    okay, where do i find the frame buffer?

    Tesla DeLorean
    Guru
    Aug 13, 2018 11:34 AM UTC

    STM32Cube_FW_F4_V1.21.0\Drivers\BSP\STM32F429I-Discovery\stm32f429i_discovery_lcd.h

    /**

     * @brief LCD status structure definition

     */

    #define MAX_LAYER_NUMBER      2

    #define LCD_FRAME_BUFFER      ((uint32_t)0xD0000000)

    #define BUFFER_OFFSET         ((uint32_t)0x50000)

    STM32Cube_FW_F4_V1.21.0\Projects\STM32F429I-Discovery\Applications\STemWin\STemWin_HelloWorld\STemWin\Target\LCDConf_stm32f429i_disco_MB1075.c

    /** @defgroup STEMWIN_LIBRARY_Private_Defines

    * @{

    */

    #undef LCD_SWAP_XY

    #undef LCD_MIRROR_Y

    #define LCD_SWAP_XY 1

    #define LCD_MIRROR_Y 1

    #define XSIZE_PHYS 240

    #define YSIZE_PHYS 320

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    mikkel nielsen
    Associate II
    Aug 13, 2018 1:51 PM UTC

    thanks, but i am using eclipse and not stm32cube

    Tesla DeLorean
    Guru
    Aug 13, 2018 2:25 PM UTC

    Eclipse is an IDE, the code uses HAL. You'll need to look at what routines/libraries you are using to paint into the frame buffer and flip or mirror the axis being used.

    If you're not using standard methods then you're going to need to be responsible for analyzing what you're using and how to adapt it to your needs.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    mikkel nielsen
    Associate II
    Aug 17, 2018 10:17 AM UTC

    finally, the screen rotate, thanks, but now i have another question, i how now a blank area at the right side, that i not can use, do you know have i can use that area