---
title: "W5500 MACRAW mode send delay"
url: "https://maker.wiznet.io/forum/15132"
markdown_url: "https://maker.wiznet.io/forum/15132/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "eibisidi"
created: "2024-01-24T09:25:25+09:00"
last_activity: "2024-01-25T04:34:45+09:00"
language: "en"
views: 173
replies: 2
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# W5500 MACRAW mode send delay

## Question

Asked by eibisidi on 2024-01-24 in Ethernet Chips.

Hello kind people.
My W5500 works in MACRAW mode . My program needs to send EtherCAT packet every 4ms in hard realtime environment. I am doing the following steps in the 4ms timer:

1. read S0_TX_WR;

2. write Socket 0 Transimit Data;

3. update S0_TX_WR;

4. write S0_CR_SEND to S0_CR which starts the transmitting;

5. wait until S0_CR is 0;

6. wait until S0_IR S0_IR_SENDOK is set;

7. clear S0_IR_SENDOK ;

8. wait until S0_TX_RD is equal to the value written to S0_TX_WR in step 3.

I capture the network flow using Wireshark running on a high performance desktop PC. The results shows that some times W5500 does **NOT** starts to transmit packet fast enough when S0_CR_SEND is written. In the worst case the packet is sent after 18ms on the wire together with its following packets. My Servo Driver device also alarms PDO timeouts. So i am pretty sure that the packet is delayed on the wire.

But the datasheet says: SEND command transmits the saved data from the current Sn_TX_RD to the Sn_TX_WR in the Socket n TX Buffer. After transmitting the saved data, the SEND command increases theSn_TX_RD as same as the Sn_TX_WR.

How could this happen? Multiple packets sent in one cycle. Wireshare capture is filtered with frame.time_delta > 0.005 to show the bad packets.

[![packets](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/7/7be1e87d8bc9bf71cd14fbd0526d3e0fc27aa0be.png) packets1537×525 37.5 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/7/7be1e87d8bc9bf71cd14fbd0526d3e0fc27aa0be.png)

## Replies

### Reply 1 by Eugeny, 2024-01-24

What PHYCFGR shows when issue happens?

### Reply 2 by eibisidi, 2024-01-25 (in reply to reply 1)

Thank you for your quick answer. I have double checked the net flow and finally found that there is nothing wrong with W5500. Wireshark packet timestamp is not right.

Thanks!

---

Source: https://maker.wiznet.io/forum/15132
