This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Light IP: TCP message size > 1460

Hello,

I'm running light IP supplied in TivaWare 2.0.

TCP message is handled in the following callback:

static err_t server_recv_handler (void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
{
	if ((err != ERR_OK) || (p == NULL) || (arg == NULL))
	{
	    /* error or closed by other side? */
	    if (p != NULL) {
	      /* Inform TCP that we have taken the data. */
	      tcp_recved(pcb, p->tot_len);
	      pbuf_free(p);
	    }
	}

	host_handle_msg (pcb,p->payload,p->tot_len);

	/* Inform TCP that we have taken the data. */
	tcp_recved(pcb, p->tot_len);

	return ERR_OK;;
}

In the handler I'm calling to "host_handle_msg " to do some work.

But it seems that if the handling of the message takes a long time and another TCP message is received, it runs over the message currently handled

What am I doing wrong ?

Thanks,
Zvika
  • Zvika.

    The question is not clear here as it goes as part of the code itself so I am posting it here again:

     

    In the handler I'm calling to "host_handle_msg " to do some work.

    But it seems that if the handling of the message takes a long time and another TCP message is received, it runs over the message currently handled

    What am I doing wrong ?

    Thanks,
    Zvika

  • Zvika.

    Below is the answer for the experts:

     

    It is still not clear what example is being referred to? We would need the following info

    1. TIVAWare 2.0 is being used by customer, did they check the same on 2.1.0 release

    2. There is a known issue of Ethernet Stack sometimes not working with Flash Prefetch ON. The user code can set the Flash Prefect Buffer OFF and see if the issue is there or not?

    Based on the feedback on the above two points we can investigate further.

    BR

    Shai A

  • Hi Shai,

    1. With 2.1.0.12573 I failed to get any connection.

    2. How can I set " Flash Prefetch OFF" ?

    Thanks,

    Zvika

  • Hello Zvika,

    TIVAware 2.1.0 is built on top of 2.0.1 and it must be compatible for the execution model.

    For the second point it is the FLASHCONF register at absolute address 0x400FDFC8 and FPFOFF is bit-16 for which you can do the following before Ethernet is enabled

    HWREG(0x400FDFC8) |= 0x10000;

    Regards

    Amit

  • Hello,

    I tried calling "HWREG(0x400FDFC8) |= 0x10000;" right after  calling to

    SysCtlClockFreqSet.

    But problem remains the same.

    Thanks,

    Zvika