stemwin without sdram

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

  • stemwin without sdram

    Hi,
    I want to use stemwin library with my stm32f429 board without any external sdram for driving 320*240 tft LCD. when i use "GUI_DispString("Hello world!")" function , i can not see anything on the screen. For discovery board there is a external sdram and in "LCDConf.c" file the frame buffer is defined as :

    Source Code

    1. #define LCD_LAYER0_FRAME_BUFFER ((uint32_t)0xD0200000)


    So, if this is the problem for my board ( i am not sure), what must this value be ? Any advise ?
  • Hi,

    I'm not sure if this will work.
    You need at least memory for one framebuffer covering the whole screen. This would require, depending on the color depth you need, something between 9,600 bytes (1 bpp) and 307,200 bytes (32 bpp). Further you need some RAM for the GUI to work with.

    This might fit into the internal RAM but maybe you have to work without some features like memory devices and multibuffering.

    There are two places you have to take care of regarding memory management.

    First is the framebuffer address. Set the define LCD_LAYER0_FRAME_BUFFER to an address which points into your internal RAM (e.g. 0x20001000, +0x1000 beacuse you will some space things like the vector table).

    The second place to look into is the GUIConf.c. Here you should make sure that the GUI memory is located in the internal RAM. If there is no GUIConf.c search for GUI_ALLOC_AssignMemory in your project.

    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 Rapid84,

    I've configured in GUIConf.c as:


    C Source Code

    1. //#define GUI_NUMBYTES 0x200000
    2. #define GUI_NUMBYTES 32 * 1024
    3. #define GUI_BUFFER_IN_EXT_RAM 1
    4. #define GUI_BUFFER_ADDRESS 0xD0600000
    5. #define OS_SUPPORT 1
    6. //#define WIDGET_USE_FLEX_SKIN 1


    C Source Code

    1. void GUI_X_Config(void) {
    2. // // 32 bit aligned memory area //
    3. #ifdef GUI_BUFFER_IN_EXT_RAM
    4. static U32 aMemory[GUI_NUMBYTES / 4]__attribute__((at(GUI_BUFFER_ADDRESS)));
    5. #else
    6. static U32 aMemory[GUI_NUMBYTES / 4];
    7. #endif
    8. // // Assign memory to emWin //
    9. GUI_ALLOC_AssignMemory(aMemory, GUI_NUMBYTES);
    10. // // Set default font //
    11. GUI_SetDefaultFont(GUI_FONT_6X8);
    12. }
    Display All

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

  • Hi,

    I think the address below does not lay in the internal RAM:

    #define GUI_BUFFER_ADDRESS 0xD0600000

    According to the STM32F429 reference manual the internal RAM starts at 0x20000000. The define should look more like this:

    #define GUI_BUFFER_ADDRESS 0x20001000

    Since I don't your application I can't tell what and where something else lays in your RAM. So, the address of 0x20001000 is just an estimation and must be adapted.

    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 @hibiscusblau,

    You define external ram adress but i dont use any external ram and i have to use internal ram adress.

    @SEGGER - Schoenen I have assigned memory to gui with my GUI_X_Config function is:

    Source Code

    1. #define GUI_NUMBYTES (1024) * 150
    2. void GUI_X_Config(void) {
    3. static U32 aMemory[GUI_NUMBYTES /4];
    4. //
    5. // Assign memory to emWin
    6. //
    7. GUI_ALLOC_AssignMemory(aMemory, GUI_NUMBYTES);
    8. //
    9. // Set default font
    10. //
    11. GUI_SetDefaultFont(GUI_FONT_6X8);
    12. }
    Display All


    If is there any wrongness please advise me.
  • Hi,
    I have reorganized the ram area according to my tft application: From IAR linker settings i set the ram end adress as 0x20026250 and i have set the LCD buffer adress as 0x20026251 in LCDConfig.c file. For now i can use the 320x39 area of the tft screen, if i want to use the line 40 (y=40) , the software crashes. So i have set the ram end adress to a value that makes the ram area bigger for gui stack, then it doesnt works ( for example if i set the ram end adress 0x20025000 it doesnt works). My gui_conf function is like below:

    Source Code

    1. #define GUI_NUMBYTES (1024) * 150void GUI_X_Config(void) {
    2. static U32 aMemory[GUI_NUMBYTES /16];
    3. //
    4. // Assign memory to emWin
    5. //
    6. GUI_ALLOC_AssignMemory(aMemory, GUI_NUMBYTES);
    7. //
    8. // Set default font
    9. //
    10. GUI_SetDefaultFont(GUI_FONT_6X8); }


    Any advise ?