STemWin stm32F429 Disco Lcd rotation of 90 degrees

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Hi Adrian,
    My hardware runs properly with your demo (IAR project). However I am still in trouble with my configuration. Have you an advise for my situation.

    Regards,
    Ibrahim
    Images
    • 2014-10-30 17.33.45.jpg

      135.68 kB, 600×688, viewed 1,007 times
  • Hello,
    I
    experimented quite the same problem.
    While
    trying to rotate the screen on the STM32F429Disco with the GUIDRV_LIN_OSX_32
    driver, images appear overlapped and/or with strange patterns in some zones.
    I was able
    to solve the problem by changing code in the file “LCDConf_stm32f429i_disco_MB1075.c”.
    I’m not sure, but I think there is a bug there.
    Here is my
    solution. In function “LCD_X_DisplayDriver”, I changed the following lines:
    case
    LCD_X_SETSIZE:
    GUI_GetLayerPosEx(LayerIndex,
    (int*)&xPos, (int*)&yPos);
    layer_prop[LayerIndex].xSize =
    ((LCD_X_SETSIZE_INFO *)pData)->xSize;
    layer_prop[LayerIndex].ySize =
    ((LCD_X_SETSIZE_INFO *)pData)->ySize;
    HAL_LTDC_SetWindowPosition(&hltdc,
    xPos, yPos, LayerIndex);
    break;

    to the
    followings:
    case LCD_X_SETSIZE:
    GUI_GetLayerPosEx(LayerIndex,
    (int*)&xPos, (int*)&yPos);
    if( LCD_GetSwapXYEx(LayerIndex) )
    {
    layer_prop[LayerIndex].xSize =
    ((LCD_X_SETSIZE_INFO *)pData)->ySize;
    layer_prop[LayerIndex].ySize =
    ((LCD_X_SETSIZE_INFO *)pData)->xSize;
    }
    else
    {
    layer_prop[LayerIndex].xSize =
    ((LCD_X_SETSIZE_INFO *)pData)->xSize;
    layer_prop[LayerIndex].ySize =
    ((LCD_X_SETSIZE_INFO *)pData)->ySize;
    }
    HAL_LTDC_SetWindowPosition(&hltdc,
    xPos, yPos, LayerIndex);
    break;

    Now
    everything is correctly displayed.
    Hope this
    will help other people to correct their problem.

    Kind
    Regards,
    Alessandro
  • LCDConf_stm32f429i_disco_MB1075.c bug for conversion from portrait to landscape STemWin in STM32Cube_FW_F4_V1.18.0

    Thank you very much, Alessando! :thumbsup:
    I was having the same problem with "STM32Cube_FW_F4_V1.18.0\Projects\STM32F429I-Discovery\Applications\STemWin\STemWin_HelloWorld\STemWin\Target\LCDConf_stm32f429i_disco_MB1075.c"

    Alessandro D wrote:

    Hello,
    I
    experimented quite the same problem.
    While
    trying to rotate the screen on the STM32F429Disco with the GUIDRV_LIN_OSX_32
    driver, images appear overlapped and/or with strange patterns in some zones.
    I was able
    to solve the problem by changing code in the file “LCDConf_stm32f429i_disco_MB1075.c”.
    I’m not sure, but I think there is a bug there.
    Here is my
    solution. In function “LCD_X_DisplayDriver”, I changed the following lines:
    case
    LCD_X_SETSIZE:
    GUI_GetLayerPosEx(LayerIndex,
    (int*)&xPos, (int*)&yPos);
    layer_prop[LayerIndex].xSize =
    ((LCD_X_SETSIZE_INFO *)pData)->xSize;
    layer_prop[LayerIndex].ySize =
    ((LCD_X_SETSIZE_INFO *)pData)->ySize;
    HAL_LTDC_SetWindowPosition(&hltdc,
    xPos, yPos, LayerIndex);
    break;

    to the
    followings:
    case LCD_X_SETSIZE:
    GUI_GetLayerPosEx(LayerIndex,
    (int*)&xPos, (int*)&yPos);
    if( LCD_GetSwapXYEx(LayerIndex) )
    {
    layer_prop[LayerIndex].xSize =
    ((LCD_X_SETSIZE_INFO *)pData)->ySize;
    layer_prop[LayerIndex].ySize =
    ((LCD_X_SETSIZE_INFO *)pData)->xSize;
    }
    else
    {
    layer_prop[LayerIndex].xSize =
    ((LCD_X_SETSIZE_INFO *)pData)->xSize;
    layer_prop[LayerIndex].ySize =
    ((LCD_X_SETSIZE_INFO *)pData)->ySize;
    }
    HAL_LTDC_SetWindowPosition(&hltdc,
    xPos, yPos, LayerIndex);
    break;

    Now
    everything is correctly displayed.
    Hope this
    will help other people to correct their problem.

    Kind
    Regards,
    Alessandro