Colors of GUI are changing sometimes by powering on

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

    • Colors of GUI are changing sometimes by powering on

      I have developed GUI with emWin for touch display.
      I'm using 8-bit color scheme.

      In emwin_support.c in the function LCD_X_Config I'm using color conversion scheme GUICC_8666_1 with display rotation.

      GUI_DEVICE_CreateAndLink(GUIDRV_LIN_OSY_8, GUICC_8666_1, 0,0)

      When I put power (5V) to the control PCB with LCD, sometimes the colors are changing, e.g. buttons can have background in red color instead of black, other colors are also changing.

      It happens also with GUI on development board LPCXpresso54608 – so it cannot be hardware problem.

      When I call e.g. the background color with function BUTTON_GetBkColor(), I get always the same value of GUI_COLOR variable – always correctly the same value of color, but in the reality the colors can differ from the previous run.

      Colors are changing only when LCD is being powered off and then on. Further the colors are constant – till the next switching off and on. With reset by debugging (without removing power from MCU) colors do not change.

      What can be wrong here? Maybe this happens because of display rotation with GUIDRV_LIN_OSY_8?

    • Some addition:

      I added some seconds delay in main() just before initialisation of emWin - before GUI_Init() and LCD_X_Config() - so the voltage should be already stable on LCD controller and LDC itself after powering MCU on - I thought it could be the cause of trouble.

      It didn't help - colors are changing randomly after switching off and powering the board again.