Correct configuration for STemWin drivers

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

    • Correct configuration for STemWin drivers

      Hi,
      I hope you can help with this. I am having trouble selecting the correct drivers and color conversion configuration. It seems no matter what combination I try, something is wrong.
      I am using the LTDC_PIXEL_FORMAT_ARGB8888 pixelFormat specifier on my layer config, and the driver library is the STemWin_CM4_OS_wc32_ot.a or STemWin_CM4_OS_wc32_ot_ARGB.a driver.

      The GUI_DRAW_BMPM8888I Bitmap was created with CVTBMP 5.44 using the True Color with Alpha, r/b swapped, alpha inverted option
      The GUI_DRAW_BMP8888 Bitmap was created with CVTBMP 5.44 using the True Color with Alpha option

      GUICC_M8888I and GUICC_8888 are COLOR_CONVERSION options.


      Matching GUICC_M8888I with ot_ARGB driver produces correct line drawing
      GUI_DRAW_BMPM8888I Bitmap has reversed R & B
      GUI_DRAW_BMP8888 Bitmap just shows white for colored areas

      Matching GUICC_M8888I with ot driver produces reversed R & B line drawing
      GUI_DRAW_BMPM8888I Bitmap is correct
      GUI_DRAW_BMP8888 Bitmap is correct

      Matching GUICC_8888 with ot driver produces correct line drawing
      GUI_DRAW_BMPM8888I Bitmap has reversed R & B
      GUI_DRAW_BMP8888 Bitmap just shows white for colored areas

      Matching GUICC_8888 with ot_ARGB driver produces reversed R & B line drawing
      GUI_DRAW_BMPM8888I Bitmap is correct
      GUI_DRAW_BMP8888 Bitmap just shows white for colored areas

      Regards,
      Lee
    • Hi,

      The correct combination for the ST devices should be:

      GUICC_M8888I - In LCDConf.c
      GUI_DRAW_BMPM8888I - For the bitmap
      ARGB Library

      When using the ARGB Library make sure that the define GUI_USE_ARGB in GUIConf.h is set to 1. Otherwise the colors for line drawing is not correct.

      Regards,
      Sven
      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.
    • Hi Sven,

      That did the trick, thanks! Although I found that at least in my setup there are two definitions of GUI_USE_ARGB - one in GuiConf.h and the other in GuiConfDefaults.h. I had already changed the one in GuiConfDefaults.h, but I guess I missed the one in GuiConf.h - or maybe it was the other way around. At any rate, I'm happy.

      Thanks,
      Lee
    • Hi,

      Better don't touch any other files than GUIConf.c, GUIConf.h, LCDConf.c and LCDConf.h.

      The file GUIConfDefaults.h is just to make sure that the defines have a value in case they are not defined in GUIConf.h. By setting defines in GUIConf.h it is possible to reconfigure emWin on build time. Of course, it is not possible to redefine these defines when using a pre-build library.

      Regards,
      Sven
      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.