LCD_X_DisplayDriver() not being called by emWin at runtime

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

  • LCD_X_DisplayDriver() not being called by emWin at runtime

    I am using the 5.16 version of emWin for the NXP LPC1788. I am using the GUIDRV_LIN_16 driver to manage a multi buffer setup with our frame buffer located in external static RAM at address 0x90000000. I have setup LCDConf.c to use the VSYNC ISR to update the screen buffer using the 3 buffer solution from the emWin documentation. I can see that the ISR is running, however the buffer is not being updated due to the LCD_X_DisplayDriver(), case LCD_X_SHOWBUFFER: not being called to update the pendingFrameIndex variable used by the ISR. Attached is my lcd configuration and gui configuration files. I do have an image on the screen after calling GUI_DrawBitmap(&myBMP, 0 , 0), however emWin does not appear to be usign the multibuffering just drawing in the screenbuffer region. I am not using the Window Manager. Is there something missing?



    Regards,

    Robert Moss
    Files
    • GUIConf.zip

      (4.2 kB, downloaded 833 times, last: )

    The post was edited 2 times, last by remoss ().

  • At first no, but I added those functions around my bitmap draw operations. It seemed to work and then the screen went blank. My breakpoint in the VSYNC ISR had the address wrong. It was not in the frame buffer area. Am I setting up the address / index properly in LCDConf.c?
    Thanks,
    Robert

    The post was edited 2 times, last by remoss ().

  • Must all operations such as clear and set color be inside the GUI_MULTIBUF_Begin() / GUI_MULTIBUF_End() functions like below?

    // Clear display and fill background

    GUI_MULTIBUF_Begin();
    GUI_SetBkColor(BK_COLOR_1);
    GUI_Clear();
    GUI_SetColor(GUI_WHITE);
    GUI_FillRect(0, 0, 320, 240);
    GUI_MULTIBUF_End();


    // Draw Shell Bitmap

    GUI_MULTIBUF_Begin();
    GUI_Clear();
    GUI_DrawBitmap(&bm_UISHELL, 0 , 0);
    GUI_MULTIBUF_End();
  • The LCD_X_DisplayDriver() is being called now to SHOW_BUFFER. I had the incorrect buffer size and pending index stored.



    BufferSize = (XSIZE_PHYS * YSIZE_PHYS * BITSPERPIXEL); // was total /8

    Addr = VRAM_ADDR + (BufferSize * pendingFrameIndex);



    Thanks,

    RMoss
  • Hello,

    Please note that the function GUI_SetBkColor() does not perform any drawing, so you can put it where you like. Nevertheless to keep the code clear, I would suggest to always put it right above the function which actually makes use of the set background color.

    Best regards,
    Adrian