Hello, I’m trying to use freertos plus TCP on a custom board with a zynq7020 and a 88E1518 phy with the included Zynq driver but no packets are being received. I know this because iptraceNETWORK_INTERFACE_RECEIVE
is never called. Packets are being transmitted just fine as in wireshark I can see gratuitous arps and iptraceNETWORK_INTERFACE_TRANSMIT
is called when they are sent. In addition to this I know there is not a hardware problem as this board has been in use with freertos and lwip for a number of years. Does anyone have any advice or have any idea what I might be doing wrong?
Are Rx interrupts enabled on both NVIC and device level? Do you see Rx ints at all?
Hi @klay2000,
Is the PHY getting detected?
Since you are using a custom board, I will start with checking if the EMAC pins and PHY pins are configured and initialized correctly. Have you checked if you are following the recommendations in the readme.txt file. [source/portable/NetworkInterface/Zynq/README.txt]
I thought the same thing, but the TO remarked that wireshark sees outgoing packets, so the PHY config looks good.
I am following the recommendations in the readme except for the version of emacps, I am using v3_12. I added a print in XEmacPs_SetHandler and XEmacPs_IntrHandler and realized I’m actually not getting an interrupt for rx or tx both.
Is the XEmacPs_SetHandler
getting called for all 3 interrupts to register the callbacks?
If you are not getting interrupt for both TX and RX even though packets are getting transmitted, can you please verify that interrupts are enabled in NVIC as @RAc mentioned.
Sorry, forgot to update this, turns out the hardware is using the other Ethernet peripheral and so the wrong interrupt was being registered. It’s now receiving and replying to arps but not pings or tcp packets.
but not pings or tcp packets
Can you check the following configurations in your FreeRTOSIPConfig.h:
- ipconfigREPLY_TO_INCOMING_PINGS
- ipconfigSUPPORT_OUTGOING_PINGS
- ipconfigUSE_TCP
For TCP what do you mean by not receiving TCP packets, is the TCP not getting connected? Can you add more context on how your device is trying to communicate over TCP?
Is FreeRTOS_printf()
defined, and does it show any logging?
Which version of FreeRTOS+TCP are you using? Does it already have IPv6 and multiple interfaces?
It’s now receiving and replying to arps but not pings or tcp packets.
The EMAC filters packets on the basis of their MAC-address. The ARP packets are possible broadcasted while broadcast is allowed.
The function XEmacPs_SetMacAddress()
is used to set the local MAC-address. Does it set the proper MAC-address?
For some reason it was filtering it’s own MAC address, but it doesn’t actually need the filtering in my case so I just masked all the bits in the allowed address. Thanks guys, I think it’s actually working now.