STM32H7 & emWin

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

  • STM32H7 & emWin

    Hi,

    I am new to emWin and I'd like to have some information.

    1) Do we need external SDRAM for frame buffer? if, yes how to calculate the size required?

    2) I found a bit difficult to understand what functions should be implemented by the user. I am using a 10.1" display with RGB interface. I will use the LTDC module in ST.
    Is there a file showing user's functions that need to be implemented?

    3) Is there a diagram showing how the emWin lib is working? like init functions, periodic functions and callbacks?

    Thanks for your help :) .

    A.
  • Hi,
    1) Do we need external SDRAM for frame buffer? if, yes how to calculate the size required?
    In general you don't need the external SDRAM. But if you want to use a large display you don't have another choice because you have to place the framebuffer somewhere in almost any case the internal RAM is not large enough.

    For the framebuffer you can calculate the memory requirements as follows:

    Pixel in x * Pixel in y * bytes per pixel * number of buffers * number of layers

    Further you might want to place the GUI memory (a memory block dedicated to emWin where it can allocate memory from. This is independent of the framebuffer) int othe external RAM. This will allow you to allocate far more memory for emWin. Although, even 100K of memory can be enough depending on the application.

    Number of buffer is the amount of buffers used for multibuffering.
    2) I found a bit difficult to understand what functions should be
    implemented by the user. I am using a 10.1" display with RGB interface. I
    will use the LTDC module in ST.

    Is there a file showing user's functions that need to be implemented?
    You have to initialize the LTDC and configure it to fit to your display. Of course, this includes the any other hardware which is required to drive the LCD (e.g. GPIOs).
    3) Is there a diagram showing how the emWin lib is working? like init functions, periodic functions and callbacks?
    At first emWin tries to get some memory and it calls the function GUI_X_Config() where the function GUI_ALLOC_AssignMemory() should be called. The function GUI_ALLOC_AssignMemory() assigns a memory block to emWin. The GUI_X_Config() can be found in GUIConf.c.

    After that emWin sets up the driver (most likely the GUIDRV_Lin driver) by calling LCD_X_Config(). Once this is done emWin calls the driver callback function LCD_X_DisplayDriver() with the command LCD_X_INITCONTROLLER. The user has to react on this command and initialize any hardware required to drive the LCD (e.g. initialize the LCD controller).

    You might want refer to the latest stm32cubeh7 package offered by STM. Under 'STM32Cube_FW_H7_V1.2.0\Projects\STM32H743I_EVAL\Applications\STemWin\STemWin_HelloWorld\STemWin\Target\' you will find a GUIConf.c and LCDConf.c used for the STM32H7 and emWin. Also there should be some projects with emWin running on the STM32H7.

    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,

    Thanks for your reply. I will have a look at the file you mentioned.
    As you said, I might look at SDRAM for the entire emWin. I have a big application to write ahead with ethernet, usb, fatfs, sdcard etc..

    I might come back later with more questions :) .


    A.