embassy-net-adin1110

Crates

git

Versions

default

Flavors

Skip to main content

Crate embassy_net_adin1110

Crate embassy_net_adin1110 

Source
Expand description

§SPE ADIN1110 embassy-net integration

embassy-net integration for the Analog ADIN1110 SPI SPE ethernet chips.

§What is SPE or Single Pair Ethernet / 10 BASE-T1L

SPE stands for Single Pair Ethernet. As the names implies, SPE uses differential signalling with 2 wires (a twisted-pair) in a cable as the physical medium. SPE is full-duplex - it can transmit and receive ethernet packets at the same time. SPE is still ethernet, only the physical layer is different.

SPE also supports PoDL (Power over Data Line), power delivery from 0.5 up to 50 Watts, similar to PoE, but an additional hardware and handshake protocol are needed.

SPE has many link speeds but only 10 BASE-T1L is able to reach cable lengths up to 1000 meters in 2.4 Vpp transmit amplitude. As of 2023, none of the standards were compatible with each other. Thus 10 BASE-T1L won’t work with a 10 BASE-T1S, 100 BASE-T1 or any standard x BASE-T.

In the industry SPE is also called APL (Advanced Physical Layer), and is based on the 10 BASE-T1L standard.

APL can be used in intrinsic safety applications/explosion hazardous areas which has its own name and standard called 2-WISE (2-wire intrinsically safe ethernet) IEC TS 60079-47:2021.

The 10 BASE-T1L standard and the ADIN1110 and ADIN2111 chips are designed to support intrinsic safety applications.

§Supported SPI modes

These chips support two SPI modes. Generic and OPEN Alliance 10BASE-T1x MAC-PHY serial interface.

Both modes support with and without additional CRC.

NOTE: SPI Mode is selected by the hardware pins SPI_CFG0 and SPI_CFG1. Software can’t detect nor change the mode.

§Hardware

§Other SPE chips

§Testing

ADIN1110 library can tested on the host with a mock SPI driver.

$ cargo test --target x86_64-unknown-linux-gnu

§Benchmark

Basic ping benchmark


60 packets transmitted, 60 received, 0% packet loss, time 59066ms
rtt min/avg/max/mdev = 1.089/1.161/1.237/0.018 ms


60 packets transmitted, 60 received, 0% packet loss, time 59066ms
rtt min/avg/max/mdev = 5.122/5.162/6.177/0.133 ms

HTTP load generator benchmark with oha

Summary:
  Success rate: 50.00%
  Total:        60.0005 secs
  Slowest:      0.0055 secs
  Fastest:      0.0033 secs
  Average:      0.0034 secs
  Requests/sec: 362.1971

  Total data:   2.99 MiB
  Size/request: 289 B
  Size/sec:     51.11 KiB

Structs§

ADIN1110
ADIN1110 embassy-net driver
ETH_FCS
Generate Ethernet Frame Check Sequence
GenericSpi
Generic SPI protocol implementation for ADIN1110
Phy10BaseT1x
10-BASE-T1x PHY functions.
Runner
Background runner for the ADIN1110.
State
Internal state for the embassy-net integration.

Enums§

AdinError
Error values ADIN1110

Constants§

MAX_BUFF
Max SPI/Frame buffer size
MDIO_PHY_ADDR
Internet PHY address
MTU
Maximum Transmission Unit
PHYID_ADIN1110
ADIN1110 intern PHY ID
PHYID_ADIN2111
ADIN2111 intern PHY ID

Traits§

Adin1110Protocol
Protocol abstraction trait for ADIN1110 SPI communication
MdioBus
MdioBus trait Driver needs to implement the Clause 22 Optional Clause 45 is the device supports this.

Functions§

new
Obtain a driver for using the ADIN1110 with embassy-net, using the Generic SPI protocol.

Type Aliases§

AEResult
Type alias Result type with AdinError as error type.
Device
Type alias for the embassy-net driver for ADIN1110