LcdWriteDataMultiple refresh line by line

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

    • LcdWriteDataMultiple refresh line by line

      Hello,

      I'm porting a project from 16-bit parallel driving to the SPI bus.
      The screen is 240 x 320 x 2 bytes.

      I'm at the maximum SPI: 32MHz
      I calculated that the refresh of full screen is around 40ms, but in reality it takes around 100ms.

      I think the bottle neck is LcdWriteDataMultiple function which send data by line (640 bytes).
      I use this init:

      Source Code

      1. GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66709, GUIDRV_FLEXCOLOR_M16C1B8);


      Can you tell me if it is possible to transmit the entire framebuffer by only one call of LcdWriteDataMultiple()?

      Thank you,
      Pierre
    • Hi,


      Unfortunately, this is not possible.

      Just imagine the rectangle to be send to the display has not the width of the display. Although we have a pointer to the start address we can not send it as one complete block as the memory is interrupted by pixel data not belonging to the rectangle (see attached).

      You might try to use the window create flag WM_C_MEMDEV when creating a window. This will result in automatic usage of memory devices. Every drawing operation into a window will be performed into a memory device first. Once the drawing operation is finished the memory device will be send as an entire block (almost the same as a bitmap) to the display.

      You might want to experiment with it and find out what fits better, using WM_CF_MEMDEV or a display cache.

      If you like to use the WM_CF_MEMDEV flag for all windows just call WM_SetCreateFlags(WM_CF_MEMDEV); before GUI_Init(). All window created after the function call will use the flag, including the desktop window.

      Regards,
      Sven
      Images
      • CacheRect.png

        454 Byte, 100×100, viewed 137 times
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.