GUI_DrawBitmap too slow on RT1062

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

    • GUI_DrawBitmap too slow on RT1062

      Hi,

      I have a board with i.MXRT1062, Cortex M7 CPU from NXP, with Emwin running on. The board has a 800x480 LCD 24bpp and LIN driver. When I try to draw a full screen bitmap it take a lot of time (more than 180mS), so with other widget on the screen I can't refresh with more than 4-5 fps.

      I tried everything, even running only the emwin on the MCU with a clean project, changing the BMP file generated with the converter, tried all color format conversion, tried the memdevice, but never reached a good refresh time.

      With MEMDEVICE i reached a drawing time of 85 ms, (including CopyToLCD call) that is better, but not enough, 'cause when I add to the screen other text or icon the time become too large.

      As last attempt I tried a workaround, I draw the BMP with a direct memcpy on the frame buffer, then implemented my own multibuffering management to avoid flickering, and it works very well, I can refresh the screen at 25 fps with less than 50% CPU load, the memcpy takes 15ms, I can draw the full screen with other icon and text in 55ms, and only the foreground is done with the direct copy into frame buffer.

      So, my questions are:

      1) Is my solution a good workaround?
      2) am I doing something wrong with emwin Drawbitmap function to have it so slow, or is emwin not able to manage this resolution due to large buffer, or other reason?
      3) is there a way to have it working faster with emwin?
      4) I can also evaluate to purchase the source code license version of emwin (in order to optimize debug of the bad performance issue), but due to the high cost, I must be sure to have it working right in some way with at least 15 fps, and CPU load under 50%, so it does exist someone who reached a good performace, or some example of a board with 800*480 24bpp LCD with emwin and a Cortex M7 with fast drawing performance? I found a lot of 480*272 16 BPP with good performance, but it is a different case than mine.

      I must understand if I can continue to work with EmWin, or if I have to find or purchase a different GUI Library. My preferred choiche would be EmWin, because I am porting a firmware with a lot of code already developed on EmWin, so it would be better to work with EmWin.

      Thanks
    • Hi,

      Does your bitmap format and the color format of your display match? If you are using GUIDRV_Lin_24, then you should also convert your BMP image to true color 24bpp. If the bitmap is in another format (e.g. 32bpp), it will be converted during runtime to 24bpp before it is written to the display, which has a heavy impact on performance.

      If you have enough memory and your display supports it, you can also configure emWin to use GUIDRV_Lin_32 and the color conversion GUICC_M8888I. Because emWin uses 32-bit colors internally, this would minimize the color conversions even further.

      Best regards,
      Florian
      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.