2

If I'm sending UDP from a microcontroller to another (both have built in MAC, STM32f4 Discovery boards to be precise), must I have a PHY attached to both or can I get away with only sending a MII signal from one to the other? From what I have gathered, within small distances this should work.

On a larger scope, I'm trying to figure out what exactly makes UDP, well, UDP.

MathieuL
  • 1,126
  • 1
  • 9
  • 22
epe
  • 23
  • 5
  • 2
    UDP is on the layer above the IP protocol, totally unrelated to ethernet or its physical implementation. You can run UDP over serial, atm, or use avian carriers just fine. – PlasmaHH Jun 28 '16 at 13:38
  • 1
    It should be possible with two MII back-to-back. This is what they do to implement repeaters (e.g. see KSZ8081 datasheet). Here, you want to put two hosts back-to-back whereas in the example I gave, it is two PHY back-to-back, but I see no reason why it wouldn't work. I can't guarantee that, though. And I'm not sure it could work with RMII, also. As I remember, with RMII, there is a timing or clock phase assymetry between send/receive signals which makes it impossible to put two back-to-back. Not sure, again. – dim Jun 28 '16 at 14:05
  • You could send UDP over a serial UART if you wanted, eg. with the SLIP or PPP protocols. – pjc50 Jun 28 '16 at 14:38
  • 3
    You can run two RMII connections back to back as long as you provide the same clock source to both devices. I've done must that on a number of server board designs. – Michael Karas Jun 28 '16 at 14:54
  • 1
    Yep, you shouldn't need a PHY if the MAC supports operating its MII/RMII interface in such a way. I know some MAC implementations don't have the SW support required for it; they're designed solely to talk to a PHY. – Krunal Desai Jun 28 '16 at 18:24

1 Answers1

1

The following are the scenarios there such a connection can be established:

  • MAC-to-MAC full-duplex MII-based connection
  • MAC-to-MAC full-duplex GPSI(SNI)-based connection

The following are the scenarios there such a connection cannot be established:

  • MAC-to-MAC half-duplex MII-based connection
  • MAC-to-MAC half-duplex GPSI(SNI)-based connection
  • PHY-to-PHY any-duplex MII-based connection
  • PHY-to-PHY any-duplex GPSI(SNI)-based connection
  • MAC-to-MAC any-duplex RMII-based connection
  • PHY-to-PHY any-duplex RMII-based connection

Note: GPSI(SNI) is for 10 Mbps only, MII and RMII are for 10/100 Mbps.

asndre
  • 1,597
  • 10
  • 17
  • 1
    You can connect two PHYs together, back to back, without magnetics. See the answer to https://electronics.stackexchange.com/questions/90330/connecting-two-ethernet-phy-without-magnetics – user71659 Nov 10 '17 at 20:09
  • @user71659 You can do this on the MDI side, not on the MII (Physical Layer Service Interface) side. Where am I wrong? – asndre Nov 10 '17 at 20:14
  • 1
    What do you mean by saying that a "PHY-to-PHY" connection cannot be established then? Connecting two PHYs together with a cable is the normal mode of operation. – user71659 Nov 10 '17 at 20:15
  • I think you mean repeater mode, which wasn't what the original question is asking. The original question is asking how to do backplane ethernet, and you can do that without magnetics via a PHY-to-PHY link. Repeater mode is indeed possible under MII and RMII with the proper setup. See [TI](https://e2e.ti.com/support/interface/ethernet/f/903/t/294643) and [Microchip](http://ww1.microchip.com/downloads/en/DeviceDoc/KSZ8081MLX.pdf) – user71659 Nov 10 '17 at 20:25
  • @user71659 I'm answering in the context of the original question. It was about MAC-to-MAC connection that could be established on the MII "plane". PHY-to-PHY in my question refers to a scenario there two PHYs are needed to be connected at the MII side, e.g. in a repeater. And yes, i'm very familiar with transformer-less Ethernet approaches, but this question is not about this at all, imo. – asndre Nov 10 '17 at 20:26
  • @user71659 KSZ8081MLX's back-to-back mode is Kendin/Micrel-specific and not IEEE 802.3-compatible. KSZ8081MLX's service interface does not provide IEEE 802.3-compatible repeater mode of operation. A KSZ8081MLX can be back-paired with another KSZ8081MLX, but not any other IEEE 802.3-compatible phy. – asndre Nov 10 '17 at 20:37