AnsweredAssumed Answered

problem while TCP Transmission of continuous data

Question asked by Punit Kumar on Mar 23, 2016
Latest reply on May 24, 2016 by Iva Dorazinova


Hi There,

I'm using lwip TCP client using raw api with kinetis k64 MCU.

It's a high speed data transmission (about 2mbps), and the code looking working good.

But there is some problem, because of which the code jumps to sys_assert() functionafter transferring few 10s of MBs and stay there. The section of code  is as follows-

 

void sys_assert( const char *msg )

{

     //FSL:only needed for debugging

     #ifdef LWIP_DEBUG

         PRINTF(msg);

         PRINTF("\n\r");

     #endif

         OSA_EnterCritical(kCriticalDisableInt);

         for(;;);

}

 

and i'm transferring the data to lwip by repeatedly calling below section

if(ERR_OK == tcp_write(tcp_conn_pcb, p_byTCPSendBuff, g_TCPSendSize, TCP_WRITE_FLAG_MORE))

{

     g_TCPSendSize = 0;

}

 

and the code jumps to sys_assert() from following section of tcp_in.c

LWIP_ASSERT("tcp_receive: valid queue length", pcb->unacked != NULL ||

                      pcb->unsent != NULL);

 

can someone tell me  what i'm doing wrong and how can i prevent the execution from going to sys_assert()

 

Thanks in advance

Punit Kumar

Outcomes