Hello,
We'd like to enable Ethernet flow control in the AM335x but have been unsuccessful so far, and would appreciate some insights on how to go about this.
Hardware is a custom AM3356 design with an Xway Gigabit PHY connected to the RGMII1 interface, and the EMAC configured as a single Ethernet port with a two-port switch in front.
Our intention is to have the EMAC automatically send out 802.3x pause frames when it runs out of RX DMA descriptors.
What we do is we advertise PAUSE/APAUSE capability from the PHY.
When auto-negotiation is complete, we verify that the link partner supports pause frames as well, and that pause frames have been enabled in the PHY.
In the EMAC we enable Full Duplex Gigabit operation, and set RX_FLOW_EN and TX_FLOW_EN in the MACCONTROL register.
We configure the FIFO allocation to 6 RX and 14 TX buffers as recommended in the TRM by writing 0xE6 to Px_MAX_BLKS for each port.
We enable flow control on all ports by setting Px_FLOW_EN to 1 for each port in the FLOW_CONTROL register.
To test it all, we flood the interface with incoming UDP packets, and observe the EMAC running out of RX descriptors, dropping packets.
The EMAC however does not send out any pause frames. We confirm this by using Wireshark dumps, and by monitoring statistics counters in the connected Ethernet switch as well as the AM3356's own counters.
Our results are the same using a variety of managed switches and PC's as link partners.
We've browsed the forum and do see a number of other questions relating to flow control, but haven't managed to find any definitive answers. The latest AM335x errata document makes no mention of Ethernet flow control either.
An alternative question - the TRM states that "Receive flow control is triggered (when enabled) when the RX_FLOW_TRIGGER input is asserted", but does not go into great detail beyond that. Could anyone shed some light on what the conditions are to trigger RX flow control?
I'll be out of the office for about a week so apologies in advance for any delays in replying.
Best regards,
Carsten