<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>MQX Software SolutionsのトピックRe: TCP/IP Task Out of Memory   Error</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/TCP-IP-Task-Out-of-Memory-Error/m-p/196350#M4083</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The TCP/IP task may be running out of memory due to the number of connections.&amp;nbsp;&amp;nbsp;&amp;nbsp; Increasing the TCP/IP stack size will not solve the problem - in fact, it will do the opposite, as less memory will be available for dynamic resources.&amp;nbsp; As suggested, using Lightweight Memory Blocks will tell you what memory is currently allocated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also set a breakpoint on line 79 of td_serr.c, to catch the spot that you are running out of memory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, there is a vFTF session tomorrow (July 15th @ 3:30 EDT) on RTCS: "vFTF - Implementing Ethernet Connectivity with the Complimentary Freescale MQX RTOS" which covers some things you can do to reduce memory requirements.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jul 2009 01:37:08 GMT</pubDate>
    <dc:creator>EAI</dc:creator>
    <dc:date>2009-07-15T01:37:08Z</dc:date>
    <item>
      <title>TCP/IP Task Out of Memory   Error</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/TCP-IP-Task-Out-of-Memory-Error/m-p/196348#M4081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am customizing the web_hvac application provided by freescale. I have change a webpage in order to type a text in a field, and then click on a button to send that text to the microcontroller. Then I store that information into flash. Problem arrives when I click the button and the function executes.&lt;/P&gt;&lt;P&gt;The following mistake comes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TCP/IP, Task ID 0x10005, TD 0x20006a34&lt;BR /&gt;Task Error Code Out of Memory(0x4), State Rx Msg Blocked, timeout&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure that this will get solve by adding more stack to TCP/IP task, and that is I the reason I am also posting the function I am using to resolve the click on the button. This function is based on functions provided by freescale, therefore I dont know if the problem is the function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
int cgi_clave_ingresar(HTTPD_SESSION_STRUCT *session) {
 uint_32  len = 0,index=0;
 char     clave[100];
 boolean  bParams = FALSE;
 char buffer[100];
 uint_8 MensajeCan[8], i;
    RTC_TIME_STRUCT time_rtc;
   
   
 html_head(session-&amp;gt;sock,"HVAC Settings response");

 httpd_sendstr(session-&amp;gt;sock, "&amp;lt;BODY&amp;gt;\n");

 httpd_sendstr(session-&amp;gt;sock, "&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;\n");

 if (session-&amp;gt;request.content_len) {
     len = session-&amp;gt;request.content_len;
     len = httpd_read(session, buffer, (int)((len &amp;gt; sizeof(buffer)) ? sizeof(buffer) : len));
     buffer[len] = 0;
     session-&amp;gt;request.content_len -= len;
     len = 0;
    
  if (httpd_get_varval(session, buffer, "clave", clave, sizeof(clave))) {
  
   bParams =  TRUE;
        
        if(PasswordIn[0] == 0x03){
              printf("El sistema esta bloqueado por intentos fallidos, espere un tiempo\n");
              return;
        }
        if(Password[0] == clave[0] &amp;amp;&amp;amp; Password[1] == clave[1] &amp;amp;&amp;amp; Password[2] == clave[2] &amp;amp;&amp;amp;
             Password[3] == clave[3] &amp;amp;&amp;amp; Password[4] == clave[4] &amp;amp;&amp;amp; Password[5] == clave[5]){ //Si el password es correcto lo almacena para las demas tareas.
          for(i = 0 ; i &amp;lt;= 5; i++){
               WriteByte(clave[i], PASSWORD_IN + i);
                  MensajeCan[ i+1 ] = clave[i];
          }
             MensajeCan[ 0 ] = WR_PASSWORD_IN;
             FifoInsertDataCAN(MensajeCan, GRYPHON_BROADCAST );
        }
        else{
             switch(PasswordIn[0]){ //se utiliza el mismo arreglo de chars para guardar la cantidad de intentos
                  case(0x00): 
                       printf("Primer Intento, la palabra clave es incorrecta\n");
                       WriteByte(0x01, PASSWORD_IN) ;
                       //PasswordIn[0] = 0x01;
                       break;
                  case(0x01): 
                       printf("Segundo Intento, la palabra clave es incorrecta\n");
                       WriteByte(0x02, PASSWORD_IN) ;
                       //PasswordIn[0] = 0x02;
                       break;
                  case(0x02):
                       printf("Tercer Intento, la palabra clave es incorrecta\n");
                       printf("No se pueden realizar mas intentos\n");
                       WriteByte(0x03, PASSWORD_IN) ;
                       //PasswordIn[0] = 0x03;
                       _rtc_get_time (&amp;amp;time_rtc);
                       WriteByte(time_rtc.minutes, PASSWORD_IN + 1);
                       //PasswordIn[1] = time_rtc.minutes; //Tambien se almacena el minuto
                       break; //del tercer intento fallido
            }
        }





      httpd_sendstr(session-&amp;gt;sock,
   "&amp;lt;!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"&amp;gt;"
   "&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;MQX&amp;lt;/title&amp;gt;"
   "&amp;lt;meta http-equiv=\"REFRESH\" content=\"0;url=hvac.html\"&amp;gt;&amp;lt;/HEAD&amp;gt;"
   "&amp;lt;BODY&amp;gt;&amp;lt;/BODY&amp;gt;&amp;lt;/HTML&amp;gt;");    
     }
    }
 
 if (!bParams) {
  httpd_sendstr(session-&amp;gt;sock, "No parameters received.&amp;lt;br&amp;gt;\n");
 }

 return session-&amp;gt;request.content_len;
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I dont know what is going on. Functions write byte use _lwmem_alloc so the buffer to write in flash should not be included in the stack provided for the task. Besides, when I add breakpoints to this function ( cgi_clave_ingresar)the error doesnt come always in the same line. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0_o&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&amp;nbsp;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:51:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/TCP-IP-Task-Out-of-Memory-Error/m-p/196348#M4081</guid>
      <dc:creator>JaimeR</dc:creator>
      <dc:date>2020-10-29T09:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: TCP/IP Task Out of Memory   Error</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/TCP-IP-Task-Out-of-Memory-Error/m-p/196349#M4082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;It looks like as you allocated all memory and TCP/IP stack can't allocate memory - check available free memory (MQX-&amp;gt;Lightweight Memory Blocks), and check if you correctly release memory allocated in your write byte function...&lt;BR /&gt;&lt;BR /&gt;If you want check stack size, see MQX-&amp;gt;Stack Usage.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2009 00:12:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/TCP-IP-Task-Out-of-Memory-Error/m-p/196349#M4082</guid>
      <dc:creator>cyborgnegotiato</dc:creator>
      <dc:date>2009-07-14T00:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: TCP/IP Task Out of Memory   Error</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/TCP-IP-Task-Out-of-Memory-Error/m-p/196350#M4083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The TCP/IP task may be running out of memory due to the number of connections.&amp;nbsp;&amp;nbsp;&amp;nbsp; Increasing the TCP/IP stack size will not solve the problem - in fact, it will do the opposite, as less memory will be available for dynamic resources.&amp;nbsp; As suggested, using Lightweight Memory Blocks will tell you what memory is currently allocated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also set a breakpoint on line 79 of td_serr.c, to catch the spot that you are running out of memory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, there is a vFTF session tomorrow (July 15th @ 3:30 EDT) on RTCS: "vFTF - Implementing Ethernet Connectivity with the Complimentary Freescale MQX RTOS" which covers some things you can do to reduce memory requirements.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2009 01:37:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/TCP-IP-Task-Out-of-Memory-Error/m-p/196350#M4083</guid>
      <dc:creator>EAI</dc:creator>
      <dc:date>2009-07-15T01:37:08Z</dc:date>
    </item>
  </channel>
</rss>

