So, I'm shoving packets between two identical T4.1s using UDP and the NativeEthernet library.
Here's the Loop code:
I've found that nothing works without the delayMicroseconds(SEND_DELAY_uS) line.
Further, I've found that I need to set the delay to something above 100uS. It seems to be more reliable at 200uS, and doesn't work at all at 50, 10, or 0. 100uS occasionally works, but not reliably.
Anyone have any idea why this might be? setup and hold times with the Phy? something else?
Really curious to see if I can get this to run at top speed - faster is better for my application (haptics).
FWIW, I'm seeing about 9.5kHz packet (receive) rates from one T4.1 to another using UDP with the delay = 100uS - damn impressive, even as it is.
/b/
Here's the Loop code:
Code:
Udp.beginPacket(destinationNodeIP, destinationPort); // aim the UDP packet to the destination IP:Port
Udp.write(sendBuffer); // send the buffer
Udp.endPacket(); // terminate the packet
Udp.flush(); // flush the send buffer, housekeeping
delayMicroseconds(SEND_DELAY_uS); // microsecond delay. still trying to determine if this is necessary
I've found that nothing works without the delayMicroseconds(SEND_DELAY_uS) line.
Further, I've found that I need to set the delay to something above 100uS. It seems to be more reliable at 200uS, and doesn't work at all at 50, 10, or 0. 100uS occasionally works, but not reliably.
Anyone have any idea why this might be? setup and hold times with the Phy? something else?
Really curious to see if I can get this to run at top speed - faster is better for my application (haptics).
FWIW, I'm seeing about 9.5kHz packet (receive) rates from one T4.1 to another using UDP with the delay = 100uS - damn impressive, even as it is.
/b/