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.

Packet Receive Operation for CPSW on AM335x

Hi,

I am writing a driver for CPSW on AM335x EVM. I have been able to do packet transmit operation successfully but the receive operation does not execute successfully. I am unaable to see any change in my Rx descriptors that have been set to CPDMA_RX0_HDP. I have configured ALE with a multicast entry for broadcast address 0xFF : 0xFF : 0xFF: 0xFF : 0xFF :0xFF and a unicast entry corresponding to my MAC ID.

Any idea, where I could be doing something incorrect? I suspect some issue with the port configurations or ALE initialization. The link and DMA initialization are correct as I have been able to successfully transmit a packet.

I have also tried running the ping operation using uboot. Somehow it also doesn't seem to receive any packet after transmitting an ARP packet into the LAN. The linux distribution also shows only a local loop device and I cannot see any eth0 device. 

  • Can anybody help me here?

    I have also tested with Android distribution. It keeps sending DHCP discover packets but can't acquire any IP. I would like to know how to test complete CPSW functionality using linux or Android on AM335x EVM.

  • Is u-boot able to get an ip address with the dhcp command? From your two posts it almost sounds like something is wrong perhaps at the hardware level since niether u-boot or the linux kernel is seeing responses.

    Are you using the SDK that comes with the EVM? Which board are you using the EVM or the Beagle Bone?

  • Yes, I have used the SDK that came with the board i.e. v5.03.

    I am working on the EVM. Have tried the uboot dhcp command. u-boot does not seem to respond to the DHCP offer packets from the DHCP server.

  • Awais Masood said:

    Yes, I have used the SDK that came with the board i.e. v5.03.

    I am working on the EVM. Have tried the uboot dhcp command. u-boot does not seem to respond to the DHCP offer packets from the DHCP server.

    I have this problem. I can't get an IP Address via DHCP in u-boot. I can't even set a static IP/Mask/Gateway and ping a known address in u-boot. Once the kernel boots, all is fine.

    Any advice on how to go about trouble shooting u-boot networking?

  • In my case, the problem had something to do with board revisions. Probably the PHY on these revisions had some issue. We switched to board rev1.1A and everything started working.

    You may check whether u-boot is able to perform link auto-negotiation by looking at the LEDs on the connector. You may also try sniffing the link to see what actually happens when you try to ping. Does u-boot send any packet at all? Ideally a broadcast ARP packet should be the first one going out of the target side. If it goes out, do you see an ARP reply from the node you are trying to ping?  That may allow you to narrow down the problem.

    Awais Masood

    Mentor Embedded

    Nucleus | Services | UI | Multi-OS

  • Just to elaborate that the ARP sequence applies to a static IP based configuration only. For a DHCP configuration, you should see a BOOTP packet as the first one going out of your target.

  • We're seeing nothing on the wire from this board: neither when tying to DHCP nor setting a static IP address and pinging. Currently, a senior engineer is looking into the CPSW driver.

    How could the PHY be bad if the linux kernel can do networking as normal?

  • This problem was due to having a 1Gbps link. When I hooked up to a 100Mbps switch, all was well. There's a processor errata that states the processor gets confused when the PHY doesn't report a connection speed. (http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=sprz360&fileType=pdf): Advisory 1.0.7.

    This is supposed to get fixed in the next revision of silicon.