problem with junk characters added,memory automatically increasing

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

  • problem with junk characters added,memory automatically increasing

    hi..


    i have two problems,
    1. I am creating the main window and its widgets before the super loop(while).I am updating all widgets(button,text,header,edit,list view)in the super loop.while updating this,memory is increasing. I found this using memory free,memory used GUI functions.

    After the usage of window (or) framewin, i deleting the window and framewin. after this process of deleting half of the memory only deleted and another half memory was not deleted.



    2. while updating the widgets, junk characters added with the original data in all widgets(buttons,text,header,edit,list view).Some times it display correct data in the widgets and sometimes its add some junk characters(Refer the attached image).
    Example:
    In the attached image,original data is 495640.but the junk characters(@:2:00) added with the original data and display in widgets.its not always happen.sometimes its happen,some times not.

    details given below.

    i am using emwin segger v5.22 with lpc1788 microcontroller,Keil tool.
    LCD display: WF70GTIAGDNT0#(7 inch display)
    SDRAM : AS4C16MI6s6TIN

    In software,
    LCDConf.c
    #define XSIZE_PHYS 800
    #define YSIZE_PHYS 480



    #define COLOR_CONVERSION GUICC_M565


    GUIConf.c

    #define GUI_NUMBYTES (1024*1024) *25
    #define GUI_BLOCKSIZE 0x128
    static data
    Volatile uint32_t *LCD_GUI_RAM_BASE = (uint32_t *) (SDRAM_BASE+0x1400000);

    please help me to resolve this problem.


    Thanks in advance..
    Images
    • IMG_20160219_170528.jpg

      298.74 kB, 785×309, viewed 562 times

    The post was edited 1 time, last by Iyyappan ().

  • problem with junk characters added,memory automatically increasing

    Hi Lutz,

    Thanks for the reply.


    Here is the code for both problems.This code i tested on today morning..

    char Disp2Buff[15]={0};
    long valueinc,valuecoun;
    WM_HWIN hHeader2,hHeader3;

    hHeader3 = TEXT_CreateEx(600,370,250,40,hWin_Main,WM_CF_SHOW,0,ID_TEXT_86,"");//creating text for display
    TEXT_SetFont(hHeader3, GUI_FONT_20B_ASCII);
    TEXT_SetTextAlign(hHeader3, GUI_TA_LEFT | GUI_TA_VCENTER);
    TEXT_SetTextColor(hHeader3, 0x00000000);
    while(1)
    {
    valueinc++;
    if(valueinc==1000)
    {
    valueinc=0;
    valuecoun++;
    GUI_Clear();
    }
    sprintf(Disp2Buff,"%4ld %4ld",valueinc,valuecoun); //moving data to the buffer
    TEXT_SetText(hHeader3,Disp2Buff); //assign the value from buffer to the text
    GUI_Exec();
    }

    this is the memory taken for updating the text alone in the display.Found this using memory used,free GUI functions.
    when the previous and present memory is not equal,controller dump the data through RS-232.like this i captured these data.

    Date Time Free memory Used memory
    27/02/2016 09:32:08 25161688 1050792
    27/02/2016 10:08:34 25137652 1074828
    27/02/2016 10:24:36 25113616 1098864
    27/02/2016 11:16:51 25089580 1122900
    27/02/2016 11:23:28 25065544 1146936


    With regards,
    Iyyappan.
  • Hi Iyyappan,

    for code, please attach the file or use the code tags.

    Please have a look at "contacting support" in the manual:

    .... send the following....

    An example source file which can be compiled in the simulation without any addi-
    tional files as described in the following.


    Regards
    Lutz
  • Regarding memory increase,junk char added,multitasking

    Hi Lutz,

    sorry for the late reply Lutz..

    My problems are(just a reminder),

    1. Used Memory is automatically increasing while update the buttons,text,edit box etc.
    2.Extra junk values added with the original data and display it in button,text,listview widgets.

    here are some more information about my coding...

    1. didn't use any RTOS,multi tasking with my project.
    2. stack size is 18 kB(0x00004800).

    find the attachment of my code.


    Please help me out with this problem.

    I don't know how to use multitasking.If u have any sample code for that,please attach with the reply mail.

    thanks in advance.
    Files
    • files.zip

      (16.71 kB, downloaded 340 times, last: )