Skip to content

⏸️[FEATURE REQUEST]🦄<Please support Ethernet to spi modules similar to W5500> #951

Closed
@liu2-3zhi

Description

@liu2-3zhi

Is your feature request related to a problem? Please describe.

The ESP32-S3 chip does not have a built-in MAC and PHY interface, so it cannot support Ethernet functionality directly like the normal ESP32.

Describe the solution you'd like

Add support for external serial-to-ethernet chips such as W5500 and ENC28J60. This can be done by:

  1. Implementing SPI driver for the ethernet chip.

  2. Implementing high-level ethernet driver based on the SPI driver.

  3. Integrating the driver into ESP-IDF TCP/IP stack.

This will allow ESP32-S3 to use Ethernet functionality by connecting external ethernet chips.

Describe alternatives you've considered

Using third-party Ethernet libraries like Ethernet.h or LwIP. But this requires porting work and won't be able to leverage ESP-IDF native network stack.

Additional context

Example code for W5500 ethernet chip support on ESP32-S3:

// ethconfig.h

#include "driver/spi_master.h"
#include "w5500_ethernet.h"

class EthConfig {

  spi_device_handle_t spi_handle;

  bool init_w5500_spi() {
    // Init W5500 SPI 
  }

  bool linkUp() {
    // Check W5500 registers 
  }

};

// ethconfig.cpp

bool EthConfig::init_w5500_spi() {
  // Init SPI
  // Add device
  // Config SPI device 
} 

bool EthConfig::linkUp() {
  
  // Transmit SPI transaction
  // Check link status bit

}

This allows integrating W5500 to ESP-IDF native network stack.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions