Skip to content

[W5500] M5Stack AtomPoE doesn't have INT/RST connected #9246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
TD-er opened this issue Feb 13, 2024 · 4 comments · Fixed by #9251
Closed
1 task done

[W5500] M5Stack AtomPoE doesn't have INT/RST connected #9246

TD-er opened this issue Feb 13, 2024 · 4 comments · Fixed by #9251
Labels
Area: ESP-IDF related ESP-IDF related issues Status: In Progress ⚠️ Issue is in progress
Milestone

Comments

@TD-er
Copy link
Contributor

TD-er commented Feb 13, 2024

Board

M5Stack AtomS3 + ATOM_PoE

Device Description

See schematic of AtomPoE
AtomS3
N.B. the pins on the AtomPoE board refer to an ESP32 Atom module.
The AtomS3 uses an ESP32-S3 and thus has different GPIO pins.

Hardware Configuration

  • SPI CLK: GPIO-5
  • W5500 CS: GPIO-6
  • SPI MISO: GPIO-7
  • SPI MOSI: GPIO-8

INT & RST set to -1

5-pin row on the Atom PoE board:

  • 3V3
  • CLK
  • CS
  • MISO
  • MOSI

image
image

N.B. Other boards with W5500 and no INT connected:

Version

latest master (checkout manually)

IDE Name

PlatformIO

Operating System

Windows 11

Flash frequency

80MHz

PSRAM enabled

no

Upload speed

115200

Description

There are boards with a W5500 SPI Ethernet controller which do not have the INT and RST pin connected.
However in the ETH::beginSPI function, this will be rejected as it checks for those pins.

To overcome this check, this function can be changed to something like this:

bool ETHClass::beginSPI(eth_phy_type_t type, uint8_t phy_addr, int cs, int irq, int rst, 
#if ETH_SPI_SUPPORTS_CUSTOM
    SPIClass *spi, 
#endif
    int sck, int miso, int mosi, spi_host_device_t spi_host, uint8_t spi_freq_mhz){
    esp_err_t ret = ESP_OK;

    if(_eth_started || _esp_netif != NULL || _eth_handle != NULL){
        log_w("ETH Already Started");
        return true;
    }
    if(cs < 0 || 
	   (
#if CONFIG_ETH_SPI_ETHERNET_W5500
        (ETH_PHY_W5500 != type) &&
#endif
		irq < 0)){
        log_e("CS and IRQ pins must be defined!");
        return false;
    }
    ...

However even with those changes, I can't get the ETH.begin function to return true.
N.B. I do call the ETH.begin function with SPI as argument.
On M5Stack Core2 (ESP32) with W5500 base plate and on ESP32-C3 board wih DM9051 this does work perfectly fine.
But those setups have INT and RST wired to the ESP.

Sketch

-

Debug Message

-

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@TD-er TD-er added the Status: Awaiting triage Issue is waiting for triage label Feb 13, 2024
@SuGlider SuGlider added Status: Needs investigation We need to do some research before taking next steps on this issue and removed Status: Awaiting triage Issue is waiting for triage labels Feb 13, 2024
@me-no-dev
Copy link
Member

This will be soon supported. IDF team is working on it.

@TD-er
Copy link
Contributor Author

TD-er commented Feb 14, 2024

Is there already some work-in-progress publicly visible?

Edit:
Found it: espressif/esp-idf@fd0a1dc

@VojtechBartoska VojtechBartoska added Area: ESP-IDF related ESP-IDF related issues Status: In Progress ⚠️ Issue is in progress and removed Status: Needs investigation We need to do some research before taking next steps on this issue labels Feb 14, 2024
@VojtechBartoska VojtechBartoska added this to the 3.1.0 milestone Feb 14, 2024
@TD-er
Copy link
Contributor Author

TD-er commented Feb 15, 2024

This will be soon supported. IDF team is working on it.

Already made a PR for it :)

@MeisterQ
Copy link

Is here any information how to use this in Arduino IDE? i have a board without IRQ and RST connected. How to use it in Arduino IDE?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: ESP-IDF related ESP-IDF related issues Status: In Progress ⚠️ Issue is in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants