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.

StarterWare enet_echo example code using mac port 2

Other Parts Discussed in Thread: AM3359

I have an eval board from Critical Link using an AM3359 based SOM with the ethernet phy connected to mac port 2.  The linux code that comes with it links up via ethernet so I know the hardware is working.  I'm trying the get the Starterware enet_echo example to run on this platform.  I've tried both the enet_echo code examples for the evmsk3359 and the evm3359.

With the evmsk3359 code example, both mac ports get initialized however a phy is only detected on port 2.

With the evm3359 code example, I modified the lwip structure to use slave_port 2 (versus 1 for the evm).

In both cases, the initialization code detects the phy and auto-negotiates a connection to the switch.  I have Static IP values defined and using Wireshark, I see a gratuitous_arp brodcast with the IP addresses.  After that nothing.  With breakpoints on both the transmit and receive interrups, I hit a breakpoint on the transmit interrupt when the arp broadcast occurs but I never get any receive interrupts.  Does anyone have any ideas??

I've also run the examples with "DUAL_MAC_MODE" defined  (which looks like it runs in vlan_aware mode) and with "DAUL_MAC_MODE" undefined (which looks like it sets up unicast and multicast entries in the ale tables) with the same results as above.

  • Hi

    Need input on if it work with DHCP and the problem is with Static IP.

    Regards,

    Ramesh D

  • Found the problem.  The Critical Link development board uses a Vitesse VSC8601 as the ethernet phy.  This phy has errata in the data sheet relating to a clock problem on the RGMII interface if the RX_Clock_Skew is set to 0 (which it is following a device reset).  After digging through the linux code, which runs on the board, I found the phy initialization function is changing the RX_Clock_Skew value in the extended RGMII Skew Control register to '11'b (2 ns).  Adding this patch to the StarterWare Enet_Echo example now makes it work.

    Before the patch I noticed all RX frames were received with either CRC or Framing errors.