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.

lwIP issue :could not send ARP package at AM335x platform associated with Starterware v2.00.01.01

Hi all,

Our project use AM335x platform and the associated Firmware is Starterware (version 02.00.01.01) ,

 We have an ARP request packet couldn’t been send issue ,

i.e. When AM335x platform use lwIP (raw API) to connect remote device , there are 2 cases ,

   1st Case is ok ,2nd Case is not ok 

1st Case:

if remote device is connected at beginning step, the “tcp_connect” function of Starterware will send ARP request package to search MAC address ,and send TCP connect package later ,this case runs well

 

2nd Case:

if remote device is not connected at beginning step, the “tcp_connect” function of Starterware will send ARP request package but no ARP response package been received ; after around 10 secs , when remote device is connected ,at this time ,we cannot see ARP request package to be transferred output and no matter how many times the tcp_connect function been called, this case is not well

 

Accroding to the issue of 2nd Case ,we have traced source code of Starterware (version 02.00.01.01) ,

Attached file is call flow of “tcp_connect” function , when issue of 2nd Case occurs , the following partial code at “cpswif_transmit” function will not be executed

   …

    if(curr_bd->flags_pktlen & CPDMA_BUF_DESC_EOQ) {
      /* Write the Header Descriptor Pointer and start DMA */
      CPSWCPDMATxHdrDescPtrWrite(cpswinst->cpdma_base,
                                 (u32_t)(bd_to_send), 0);
    }

  …

Such that ARP request package could not be transferred and send out ,

after checking with AM335X TRM ,

We know it exists some situations such that EOQ bit of Transfer End Package could not be raised

  1. Previous TX DMA transfer is not finished or
  2. EOP bit of Transfer End Package keeps 0 or next descriptor of Transfer End Package is not NULL

 

Could you help to explain this issue ,and Is there any solution ?

<PS> If We use M3 Platform on hand associated with Firmware Starterware ,and use lwIP (raw API) to connect remote device ,there is no Issue of 2nd Case

   

  • Hi,

    If case2 works fine with M3 Platform then same logic shall work with AM335x from LWIP porting point of view. Please confirm if same code base is used for both platforms. Straight away I donot see the cause for the same. I shall look into the same and revert back.

    Regards,

    Ramesh D

  • Hi Ramesh Dandamudi,

    thanks for you reply very much,

    I have some mistake of this question description ,

    I update the following points -->

    1.the assicated firmware of M3 platform on our hand  is Stellariware ,but not Starterware

    2.the code base of Stellariware which runs at M3 platform is different from the code base of Starterware which   runs  at AM335x platform ,especially the part of lWIP related function,

    ex: at the code base of Stellariware which runs at M3 platform ,the lWIP service timer will routely call etharp_tmr()   function to check global array arp_table,but ,

           at the code base of Starterware which runs at AM335X platform ,the lWIP service timer will not routely call etharp_tmr()   function [and when we add etharp_tmr() or dhcp_fine_tmr() into  lwIPServiceTimers() function ourself ,side effect will occur]

    3. at Stellarisware RDK-S2E (runs at M3 platform) ,we can see example test code of TCP client ,

        but ,at Starterware (runs at AM335x platform) ,we cann't see any example  test of TCP client

    Hope the information are useful ~ 

    Best Regards