SEPS525 Driver Issue

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

    • SEPS525 Driver Issue

      Dear Segger
      I am struggling getting emWin5 to drive an OLED display using the SEPS525 driver provided as part of the STM Cube environment. I am using Crossworks V4 for development.
      The OLED with SEPS525 driver is connected to an STM32F429 using the FMC in 8 bit LCD data bus mode and I am attempting to drive without cache.
      My edited config file is shown below.


      void LCD_X_Config(void)
      {
      GUI_DEVICE * pDevice;
      CONFIG_FLEXCOLOR Config = {0};
      GUI_PORT_API PortAPI = {0};
      /* Set display driver and color conversion */
      pDevice = GUI_DEVICE_CreateAndLink(GUIDRV_FLEXCOLOR, GUICC_565 , 0, 0);

      /* Display driver configuration, required for Lin-driver */
      LCD_SetSizeEx (0, XSIZE_PHYS , YSIZE_PHYS);
      LCD_SetVSizeEx(0, VXSIZE_PHYS, VYSIZE_PHYS);
      /* supported parameters: GUI_SWAP_XY, GUI_MIRROR_X, GUI_MIRROR_Y or any combination of these paramters */
      /* Orientation */
      Config.Orientation = 0;

      #if (NUM_BUFFERS > 1)
      GUI_MULTIBUF_ConfigEx(0, NUM_BUFFERS);
      #endif
      GUIDRV_FlexColor_Config(pDevice, &Config);
      //
      // Set controller and operation mode
      //
      PortAPI.pfWrite8_A0 = LcdWriteReg;
      PortAPI.pfWrite8_A1 = LcdWriteData;
      PortAPI.pfWriteM8_A1 = LcdWriteDataMultiple;
      PortAPI.pfReadM8_A1 = LcdReadDataMultiple;

      GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66718 , GUIDRV_FLEXCOLOR_M16C0B8);
      }

      I have created the LcdWriteReg, LcdWriteData etc, functions as required.
      I am 100% confident that these functions, my FMC and hardware is working fine as these register access functions are used to initialise the display and can be used subsequently with c test routines from the display manufacturer to control the display perfectly.
      My OLED initialisation does get called by emWin:
      int LCD_X_DisplayDriver(unsigned LayerIndex, unsigned Cmd, void * pData) {
      int r;
      (void) LayerIndex;
      (void) pData;

      switch (Cmd) {
      case LCD_X_INITCONTROLLER: {

      /* Component Initialization */
      LCDController_Init();
      //Run_test_demo();

      return 0;
      }
      default:
      r = -1;
      }
      return r;
      }
      Unfortunately when emWIn tries to access the display I am getting strange results. As a starter, Lines and Circles get drawn in the correct position on the display, but drawing is not the correct colour, pixels seem to be missing and simple text is again in the correct place but garbage.
      Attached is a screen shot of drawing 7 lines of different colours R, G, B ,W, C, M, Y. and the simple text "abcde" using the default font.
      I have tried various changes to program heap allocations and stack etc (which tend to fix these sort of things) and the different versions of the GCC libraries supplied through the cube. I am getting the same results whatever I do.
      Have you any idea what may be going on here as I am beginning to think that the selected F66718 library with 8 bit data no cache, is not sending the correct data to the register access functions.
      Many thanks
      James
      Images
      • SEP525.jpg

        183.66 kB, 2,761×1,810, viewed 63 times
    • Hi,

      Right now I have no idea what causes this behavior.

      Attached you will find a sample LCDConf.c we have used for this controller.

      In your code you use:

      C Source Code

      1. #if (NUM_BUFFERS > 1)
      2. GUI_MULTIBUF_ConfigEx(0, NUM_BUFFERS);
      3. #endif


      Not sure if this has an impact but multibuffering is only available with the GUIDRV_Lin driver.

      Did you tried to check the data which are send from emWin to the controller?
      Are these data as expected?

      Regards
      Sven