STemWin DMA use for rotated screen

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

    • STemWin DMA use for rotated screen

      Hi,
      We are working with STM32F4 MCU and Sitronix ST7789V driver for a TFT display (of 240*320 px).
      We plan to use STemWin to make the GUI and we need to rotate the display by 90° (from 240*320 to 320*240).
      As we have other tasks done by the MCU, we want to use the DMA to copy the frame from the MCU to the screen RAM. However, as the screen is rotated, we don't want the DMA to increment 240 by 240 to copy the pixels but to increment one by one.
      So our question is : does the STemwin library allow it ? And what do we have to add in addition to the GUI_MIRROR_/GUI_SWAP_ config ?

      Thanks a lot for your help,
      Marc
    • Hi,

      You can use the DMA in the write function for multiple bytes (GUI_PORT_API structure member: pfWriteM8_A1). Just use the DMA to send the data bytes.

      Rotation is also possible with GUI_SetOrientation(). Please note that this method requires some additional memory because we create a rotation device in the background.

      Most LCD controllers support rotation and we recommend to use rotation by the LCD controller. In most cases this is way faster.

      Regards,
      Sven
    • Hi Sven,

      The LCD controller we use (ST7789V) supports rotation. Do you think it could be enough to have a 320*240 px in MCU memory then send data bytes to the controller with DMA ? Not using at all SetOrientation, only setting LCD controller rotation with commands. I suppose you may not be familiar with the LCD controller we use but this may be a classic application case.

      Regards,
      Marc

      The post was edited 1 time, last by MarcA ().