How can I learn more about GUI memory

  • Hello everyone
    where can I find more detail about aMemory array ( the following code):

    C: GUIConfig.c
    GUI_ALLOC_AssignMemory(aMemory, GUI_NUMBYTES);

    Detail about how and where the screen pixels information located in the aMemory array.

    I have some problem when I use external SRAM as GUI memroy in STM32F407. It's look like that the image within LCD has been shifting upward in the SRAM mode.

    Thanks in advance

    Edited 2 times, last by Haia_Boosa (May 18, 2020 at 8:06 PM).

  • Hi,

    It depends on the LCD driver you are using where the pixel data is stored.

    If you are using the GUIDRV_Lin driver the data is stored within the framebuffer which gets not allocated from "aMemory". The framebuffer typically gets allocated within the LCDConf.c and is not done by emWin.

    If you are using another driver, e.g. the GUIDRV_FlexColor driver, a buffer of one line gets allocated from "aMemory". In case you are using the GUIDRV_FlexColor driver with a cache enabled a complete screen gets allocated. Unfortunately, you don't have direct access to this buffer.

    Which driver are you using?

    You also want to double check your SRAM settings.

    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: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

  • Hi Sven
    Thanks for replying
    The configuration is as follows:

    Target is STM32F407 and LCD driver is ILI9341.
    SRAM settings is verified by writing and reading back from 8,16 and 32 bit defined variable in the SRAM address range.

    Best regard.

  • Hi,

    Your configuration file looks good so far.

    You might want to try another read function. Please refer to the API description of GUIDRV_FlexColor_SetReadFunc66709_B16() in the emWin user manual.

    You should also check your write functions. It can be possible that the LCD controller expects the data in another order.

    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: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!