2010-05-06 07:36:18     problem using ethernet

Document created by Aaronwu Employee on Sep 25, 2013
Version 1Show Document
  • View in full screen mode

2010-05-06 07:36:18     problem using ethernet

Kanwar Saad (PAKISTAN)

Message: 89176   

 

hi, i have ported u-boot 2009R1.1 to my custom bf537 board having national semiconductor DP83848i PHY. u-boot is working fine. but any command related to network is not working. so i pinged my pc from u-boot and checked on wireshark whether there is any activity on line. i found that once in 20 or more pings an ARP packet gets through on the line.  to debug i used following steps.

 

Test 1:

 

i  inserted my own code to send a dummy udp packet through bfin_EMAC_send() function. i have send millions of packets all of them are received on the other side.

 

Test 2:

 

then i tested the protocol stack of u-boot whether it is sending the correct packet or not using loopback configuration and received the packet through bfin_EMAC_recv() function. the packets were perfect even the zero padding and checksum were correct.

 

i used local MAC loopback, then PHY loopback and then loopbacked from wire. every loopback is working fine.

 

 

 

But as soon as i remove the loopback and connect to pc there is a huge packet loss.

 

i cant understand what is the matter with it.

 

 

 

 

 

Regards

 

kanwar saad

QuoteReplyEditDelete

 

 

2010-05-06 14:20:43     Re: problem using ethernet

Mike Frysinger (UNITED STATES)

Message: 89196   

 

you can read the phy regs directly using 'mii read'.  that way you can check the status of the phy directly.  you might also want to consult the TX/RX status registers to see if anything is flagged as an error.

 

make sure the phy pins are wired/pulled correctly ... if the error pin is floating, packets might be discarded immediately.

QuoteReplyEditDelete

 

 

2010-05-10 03:47:28     Re: problem using ethernet

Kanwar Saad (PAKISTAN)

Message: 89277   

 

   no error in phy registers and MAC tx/rx status registers. everything is going fine.

 

i think the problem is in the analog side of the PHY. probably the noise margins are too low to understand and recover the clock. since my own phy has the same clock state in tx and rx so it works in loopback but the PHY of my PC is not synching with it.

 

kindly verify my approach.

 

Another awkward thing i found is that when i press any key on console there is some garbage sent on the ethernet line. Also when i ping other system first it sends an ARP request when it doesnt find anything in response it waits for some time. during this wait time there is a huge garbage activity on line. i verified from system MMR's that my DMA and ethernet both are in stopped state in that wait time then from where this activity is happening.  But as soon as eth_halt() function is called all that activity stops. :-(

 

 

 

Regards

 

Kanwar Saad

QuoteReplyEditDelete

 

 

2010-05-10 03:49:38     Re: problem using ethernet

Kanwar Saad (PAKISTAN)

Message: 89278   

 

Also i've verified the schematic many times from reference designs and datasheets. It's all ok.

QuoteReplyEditDelete

 

 

2010-05-10 11:22:02     Re: problem using ethernet

Mike Frysinger (UNITED STATES)

Message: 89287   

 

obviously serial traffic should have no bearing on ethernet.  i dont know what you mean by "garbage", but that sounds like hardware crosstalk.

Attachments

    Outcomes