lwIP Echo Server - Snickerdoodle black + piSmasher

Hello,

my goal is to run the FreeRTOS lwIP Echo Server Example provided in Vitis on my snickerdoodle black + piSmasher setup.
I followed this tutorial which is linked on the krtkl website to make the ethernet ports accessible through the gmii2rgmii IP via EMIO. I also followed the advice of this post and configured the zynq ps to select MIO 19 & 17 as reset pins.
I then used the generated bitstream to setup a vitis project from the FreeRTOS lwIP Echo Server Example (I tried Standalone with same outcome) and changed nothing but turning dhcp off. After programming the fpga and running the example via jtag I recieve the following output:

output

So far so good but the board is not pingable and I cannot connect via telnet. My connection setup (firewall etc.) seems correct as I can ping my second laptop. Also it looks like the emacps driver does not actually find a phy and sets up the link speed for the broadcast phy address 0. Not sure if that’s a problem.

In a second tutorial it is mentioned that the phy address in the gmii2rgmii IP should be set to 0 (default was 8 for enet0 and 9 for enet1). However when I do this phy setup and auto-negotiation in the xemacpsif driver fails and Ethernet link is down:
output 2

In both cases I played with XPAR_GMII2RGMIICON_0N_ETH0_ADDR from xparameters.h which defines the MDIO address for the gmii2rgmii IP but had the same outcome. Besides that I also tried disabeling auto-negotiation but that didn’t solve it either.

How do I need to configure my setup? Is there any working example for use with lwIP available? Can you see what I am doing wrong from my description?

Any help would be very much appreciated (also advice on how to debug this problem, as I am a beginer)!

My block design:

block design

@robindust not sure if you were able to get this resolved, but it seems like it’s got something to do with the clocks. What you might try is adding clocking counters with the PHY clocks and attaching the counter outputs to VIOs that you can check with the JTAG to see what runs at which rate and what doesn’t. You may need to divide it down too..

For example, you could have a counter that rolls over at the clock frequency and a counter chained to that that increments on the rollover pulse. Then you can monitor those on the VIO, so everything you’re looking at should count in seconds. If the frequency is wrong or it doesn’t run, it becomes a lot more obvious.

-Ryan