Renesas RA6M3 EmWin AppWizard 90 degree screen rotation problem

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

    • Renesas RA6M3 EmWin AppWizard 90 degree screen rotation problem

      Dear Segger Forum Members,
      I am working on controller project with RA6M3 processor. I'm designing a control panel on a 7" tft screen. But we want to use a vertical tft screen in the project. Can you help with this? I'm using the AppWizard GUI to create the EmWin interface. Although I make the necessary changes in the LCDConf.c file, the screen does not rotate. Half of the screen either crashes or is black. I use external SDRAM as framebuffer. I drive TFT with RA6M3 processor. I don't use an external TFT driver. Please help me with this. Thank you in advance.

      #define DISPLAY_HSIZE_INPUT0 (800)
      #define DISPLAY_VSIZE_INPUT0 (480)
      #define DISPLAY_BUFFER_STRIDE_BYTES_INPUT0 (((DISPLAY_HSIZE_INPUT0 * DISPLAY_BITS_PER_PIXEL_INPUT0 + 0x1FF) >> 9) << 6)

      #define DISPLAY_BUFFER_STRIDE_PIXELS_INPUT0 ((DISPLAY_BUFFER_STRIDE_BYTES_INPUT0 * 8) / DISPLAY_BITS_PER_PIXEL_INPUT0)


      #define EMWIN_LCD_XSIZE_PHYS (DISPLAY_BUFFER_STRIDE_PIXELS_INPUT0)
      #define EMWIN_LCD_YSIZE_PHYS (480)


      //
      // Set display driver and color conversion for 1st layer
      //
      GUI_DEVICE_CreateAndLink(GUIDRV_LIN_OSX_16, EMWIN_LCD_COLOR_CONVERSION, 0, 0);

      //
      // Display driver configuration
      //
      if (LCD_GetSwapXY())
      {
      LCD_SetSizeEx(0, EMWIN_LCD_YSIZE_PHYS, EMWIN_LCD_XSIZE_PHYS);
      LCD_SetVSizeEx(0, EMWIN_LCD_YSIZE_PHYS, EMWIN_LCD_XSIZE_PHYS);
      }
      else
      {
      LCD_SetSizeEx(0, EMWIN_LCD_XSIZE_PHYS, EMWIN_LCD_YSIZE_PHYS);
      LCD_SetVSizeEx(0, EMWIN_LCD_XSTRIDE_PHYS, EMWIN_LCD_YSIZE_PHYS);
      }
    • Hi Mahmut, sorry for late return.

      i am calling this function start of my code.

      after calling these:

      GUI_Init();
      WM_MULTIBUF_Enable(1);
      GUI_MEMDEV_MULTIBUF_Enable(1);

      OrientationInit(VERTICAL_ORIENTATION);

      Source Code

      1. void OrientationInit(int _v_h)
      2. {
      3. if( _v_h == VERTICAL_ORIENTATION )
      4. {
      5. GUI_SetOrientationEx(GUI_SWAP_XY | GUI_MIRROR_X, 0);
      6. }
      7. v_h = _v_h;
      8. }