Best color mode for STM32F7

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

    • Best color mode for STM32F7

      I'm currently testing to make STM32F746IG working at best performance with emWin library.
      --> MT48LC4M16A2P SDRAM is used for framebuffer and LCD Connection is 16bpp

      But currently I losing somewhere in choosing color modes.

      I will only use 65k color(16bit) so possible color mode selection will be

      1. GUICC_565
      2. GUICC_565 with ARGB
      3. GUICC_M565
      4. GUICC_M565 with ARGB

      I tested with many samples but can not sure I'm in right way.
      For example, I tested attached image in both GUICC_M565 and GUICC_M565 with ARGB library.
      The result was without ARGB library draw the image much faster(Eventhough I checked "Save colors in ARGB")
      --> This made me very confusing.....

      So, which one I need to choose to get best performance with STM32F7?

      And also I think it is strange.

      I tried to convert a PNG file to "c" file by using BmpCvtST V5.40

      Whatever I check or uncheck "Save colors in ARGB mode" in option menu, the result is always same.

      My LCDConf.c file is based on ST example(only difference is from original file is modification on _DMA2D_ExecOperation() and GPIO Configuration)

      So I think I did not make big mistake on the drive code.

      Please give me some advise.

      Thank you.
      • Flow1.png

        29.37 kB, 245×240, viewed 45 times
      • converted.7z

        (33.91 kB, downloaded 18 times, last: )
      • LCDConf.7z

        (10.92 kB, downloaded 18 times, last: )
    • Hi,

      the best color mode would be GUICC_M8888I - ARGB. This one offers the best performance since there is no conversion required. Inernally emWin computes with 32bit colors, so when drawing to the framebuffer the colro have to be converted to 16bit.

      But with 16 bit it is M565. In this case it doesn't really matter whether if the GUI_USE_ARGB flag is set or not. The output gets always converted to the chosen color format (M565 or 565).
      But I would recommend to use a library (or compile the code) with GUI_USE_ARGB set.

      Whatever I check or uncheck "Save colors in ARGB mode" in option menu, the result is always same.
      This effects only pallete based bitmaps. You choose the proper format when saving as c-file. Choose 'High color (565), red and blue swapped' for 16bit bitmaps. If it should contain transparency choose 'True color with alpha, r/b swapped, alpha inverted'.