Post Go back to editing

lwip problem-ping not working /BF527

Hi.

We have a hardware with ethernet lan 8700i  with PHYADD = 1f and with full duplex. we changed Dev->phyadd = 0x1f and full duplex = true in liblan8700BF527

using following program. after run program shows link established. but ping and connect is not happening. in our hardware we are using BF527 processor.

Target is able to send ARP packets.We use the program below which works fine in adsp bf527 ez kit.

C:\Program Files\Analog Devices\VisualDSP 5.0\Blackfin\Examples\ADSP-BF527 EZ-KIT Lite\LAN\Host\FILESERVER

can u plz suggest us the problem why ping is not happening.We tried TCPIPTRACE,INETD programs also ,and ping fails but link is established.

We have reserved bank3 (LAST BANK)flash for FPGA.

Thanks...........

  • Hi,

    I believe we are already dealing with this request through private support. To avoid duplication of effort, please continue to communicate with private support on this matter. If appropriate, we will post the outcome here.

    Regards,

    Craig.

  • Hi Craig,

    Please find that this is just ethernet brinup problem in a target(Mentioned configuration).

    This is entirely different from what we are doing in tool support.

    • When the target is receiving from host,packets are getting lost .We found that receive_ok bit not getting set and packet length is less than 64 bytes.

    Can you please tell what could be reason.

    • Is there any sample code for testing ethernet without DMA?

    We already spent much effort on this ping issue.

    Thanks in advance

  • I had a similar issue with the bf526.  The problem turned out to be that the library lan files configured the PHY for RMII mode, but the hardware was configured for MII mode.  You might try checking the RMII bit in the EMAC_OPMODE register.  I was able to get around the problem by simply clearing the RMII bit before starting the IP stack.

    Ethan

  • What does RX_FRAG & RX_FRLEN indicate? I think the default size of a PING packet is 74 bytes from a Windows PC. You may also catch the ICMP packets via a RAW socket with the buffer considering the IP packet, ICMP packet and echo data.

    // create RAW socket
    rawSocket = socket(AF_INET, SOCK_RAW, IP_PROTO_ICMP);

    // catch the echo request
    sock_ret = recvfrom(socket,         
               &echo_request_info,         
               sizeof(echo_request_info), 
               0,       
               NULL,     
               NULL);

    Regards

    Prasanth.

  • we verified that already.Both in hardware and software its RMII only.

    We sent PING from host pc to target.

    By analyzing the contents of EMAC_RX_STAT register, we found that, Recieve_OK bit not set and packet is received with less than minimum packet length (64 bytes) required.

  • Hi minnu,

         I encounterd  a similar issue with the bf537. After run program shows link established. but ping and connect can not working.    

         Can you tell how to deal with the issue?

         Or anyone can give me some suggest? I'm stuck in the ping problem !

    Regards

    Jia

  • Are you seeing IP-address printed on VDSP console? Are you using EZ_KIT? Have you checked correct sub-net masking? Did you provide your own IP-address to PC?

  • Hi Prasanth,
    Thanks for your response!

    It's not EZ_KIT. I run my application program in my hardware with ethernet lan 8787.  I configure the IP address ,Subnet and Gateway by using the TCP/IP Configuration Manager. But the IP-address printed on VDSP console isn't the configured one, when run the follow  segment code in lwip_sysboot_threadtype.c.
        memset(ip,0,sizeof(ip));

          if(gethostaddr(0,ip))

          {

           printf("IP ADDRESS: %s\n",ip);

          }

    By setting breakpoint,I find that user_net_config_info.ipaddr,netmask and gateway haved be changed after  the call to "init_stack()". why?
    I believe that the IP address to PC is setted correctly.

    Regards

    Jia

  • Hi

    What are the values you programmed and what are the values reflected in memory? Can you post screenshots of GUI and user_net_config_info in expression window? Maybe you should try this with a default LwIP template. Is there any reason to think that these variables reside in SDRAM and maybe that is corrupting the data? As a second step, if the new values in memory are consistent, you may program PC with similar values (typically just change IP address + 1) and PING to Blackfin.

    Regards

    Prasanth

  • Hi

         The  IP address printed on VSDSP console isn't the one configured by TCP/IP Configuration Plugin. I find that it is same to the value stored at memory address 0xff903080, as shown in Figure1(see in attachment).

         When I put the IP address, Subnet and Gateway, which I want to set, into the memory that start at 0xff903080 before the call "system_init" in lwip_sysboot_threadtype.c , the  printed IP address is correct, as shown in Figure2. Now it can PING to blackfin from PC, and my application work fine.

         How the program set the IP address to blackfin? Dose it get the IP address from memory 0xff903080 ?

    Regards

    Jia

    attachments.zip