[SOLVED] pb ESP32 + W5500 lite

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
oldneef
New user
Posts: 7
Joined: 11 Apr 2024, 06:32

[SOLVED] pb ESP32 + W5500 lite

#1 Post by oldneef » 11 Apr 2024, 11:49

Hello,
and above all thank you for this super software.

I have a problem having with my w5500 and my ESP32 classic with ESP_Easy_mega_20240331_normal_ESP32_4M316k_ETH.factory.bin

my W5500 : https://fr.aliexpress.com/item/10050062 ... pt=glo2fra

I did the assembly as shown here :
Image

ans and I set espeazy spi :
CS GPIO=5
CLK GPIO=18
MISO CLK GPIO=19
MOSI CLK GPIO=23

but it is impossible to have an ethernet connection I don't know if the module is not working well or if I am doing something wrong.
Thank a lot.
Last edited by oldneef on 12 Apr 2024, 21:37, edited 1 time in total.

TD-er
Core team member
Posts: 8762
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: pb ESP32 + W5500 lite

#2 Post by TD-er » 11 Apr 2024, 11:55

First of all, please double/triple check to see if you get the expected voltages to power the W5500 as there are ESP32 boards out there which do not have the correct silkscreen regarding the GND/5V

Second, GPIO5 may not be the best choice here as it does have an internal pull-up resistor and I'm not sure if that will have any impact.
See: https://espeasy.readthedocs.io/en/lates ... e-on-esp32

Also if there is an IRQ pin present on the W5500, you may want to use it as I don't know if it will work when it is left floating.

I know there is also a W5100, which should be nearly identical, but this "nearly" may be more important than it seems, so check to see if you have a W5500 or W5100.

The W5500 should only be possible to use with "LittleFS" builds as the SPI Ethernet is not implemented in IDF-4.4 builds of ESPEasy.
See for the latest builds: https://td-er.nl/ESPEasy/latest/

oldneef
New user
Posts: 7
Joined: 11 Apr 2024, 06:32

Re: pb ESP32 + W5500 lite

#3 Post by oldneef » 11 Apr 2024, 13:27

thank you for your feedback, I will look at all this when I get home.

I have a question, how to know if you are in IDF-4.4 or IDF-5.1. Doesn't the version of espeasy ESP_Easy_mega_20240331 include IDF-5.1?

TD-er
Core team member
Posts: 8762
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: pb ESP32 + W5500 lite

#4 Post by TD-er » 11 Apr 2024, 13:30

ESP32 Builds with "LittleFS" in the name are based on ESP-IDF5.1

oldneef
New user
Posts: 7
Joined: 11 Apr 2024, 06:32

Re: pb ESP32 + W5500 lite

#5 Post by oldneef » 11 Apr 2024, 21:52

92/500
I installed the version and I can choose a w5500 card but I have the following problem:

INIT : Booting version: ESP_Easy_mega_20240331_normal_ESP32_4M316k_LittleFS_ETH, (GitHub Actions) mega-20240401 (ESP32 SDK 5.1.3.240313)
21:37:15.555 -> 00.176 : (288276) Info : INIT : Free RAM:288276
21:37:15.583 -> 00.188 : (288100) Info : INIT : Soft Reboot #9 Last Action before Reboot: Background Task Last systime: 0 - Restart Reason: CPU0: Software reset CPU CPU1: Software reset CPU
21:37:15.584 -> 00.200 : (288020) Info : FS : Mounting...
21:37:15.611 -> 00.233 : (286028) Info : FS : LittleFS mount successful, used 151552 bytes of 323584
21:37:15.643 -> 00.266 : (285816) Info : CRC : Settings CRC...OK
21:37:15.643 -> 00.292 : (285660) Info : ESPEasy console using ESPEasySerial
21:37:15.686 -> 00.317 : (285544) Info : CRC : SecuritySettings CRC...OK
1:37:15.709 -> 00.350 : (285176) Info : INIT : SPI Init (without CS)
21:37:15.743 -> 00.376 : (285112) Info : ESPEasy console using ESPEasySerial
21:37:15.743 -> 00.377 : (285064) Info : INIT : Free RAM:285112
21:37:15.775 -> 00.401 : (285000) Info : ESPEasy console using ESPEasySerial
21:37:15.775 -> 00.403 : (284888) Info : INFO : Plugins: 48 ["Normal"] (ESP32 SDK 5.1.3.240313)
21:37:15.775 -> 00.404 : (284848) Info : ETH PHY Type: W5500(SPI) PHY Addr: -1 CS: 5 IRQ: -1 RST: 13
21:37:15.811 -> 00.415 : (284784) Error : SPI not enabled
21:37:15.903 -> 00.530 : (267904) Error : ETH : Failed to initialize ETH
21:37:15.903 -> 00.531 : (267856) Info : Set Network mode: WiFi
21:37:16.000 -> 00.633 : (267808) Info : WIFI : Set WiFi to STA

TD-er
Core team member
Posts: 8762
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: pb ESP32 + W5500 lite

#6 Post by TD-er » 11 Apr 2024, 22:07

"SPI not enabled" is clear, right?
See: https://espeasy.readthedocs.io/en/lates ... i-ethernet
And about the SPI bus configuration: https://espeasy.readthedocs.io/en/lates ... -interface

You need to select the "User-defined" option and then the pins.
Also I don't know if you can set the addr to -1 as I never tried this auto detect myself.


Also you should flash a newer build as there have been some issues fixed in the last few days: https://td-er.nl/ESPEasy/latest/

TD-er
Core team member
Posts: 8762
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: pb ESP32 + W5500 lite

#7 Post by TD-er » 11 Apr 2024, 22:11

Hmm Ton messaged me that there might be a bug in the SPI handling, resulting in the error message in the logs.
So can you at least double check the SPI config?

oldneef
New user
Posts: 7
Joined: 11 Apr 2024, 06:32

Re: pb ESP32 + W5500 lite

#8 Post by oldneef » 11 Apr 2024, 22:27

I update to the latest version and keep you informed

oldneef
New user
Posts: 7
Joined: 11 Apr 2024, 06:32

Re: pb ESP32 + W5500 lite

#9 Post by oldneef » 11 Apr 2024, 23:21

ok thank you for your help,

I still have the problem

3:18:17.407 ->
INIT : Booting version: ESP_Easy_mega_20240411_normal_ESP32_4M316k_LittleFS_ETH, (GitHub Actions) HEAD_b7734ea (ESP32 SDK 5.1.3.240325)
23:18:17.407 -> 00.171 : (287676) Info : INIT : Free RAM:287676
23:18:17.438 -> 00.182 : (287548) Info : INIT : Cold Boot - Restart Reason: CPU0: Vbat power on reset CPU1: for APP CPU, reset by PRO CPU
23:18:17.438 -> 00.194 : (287436) Info : FS : Mounting...
23:18:17.471 -> 00.234 : (285444) Info : FS : LittleFS mount successful, used 151552 bytes of 323584
23:18:17.502 -> 00.279 : (285244) Info : CRC : Settings CRC...OK
23:18:17.534 -> 00.304 : (285092) Info : ESPEasy console using ESPEasySerial
23:18:17.566 -> 00.345 : (284976) Info : CRC : SecuritySettings CRC...OK
23:18:17.598 -> 00.378 : (284696) Info : INIT : SPI Init (without CS)
23:18:17.630 -> 00.404 : (284632) Info : ESPEasy console using ESPEasySerial
23:18:17.630 -> 00.405 : (284584) Info : INIT : Free RAM:284632
23:18:17.662 -> 00.428 : (284520) Info : ESPEasy console using ESPEasySerial
23:18:17.662 -> 00.429 : (284408) Info : INFO : Plugins: 48 ["Normal"] (ESP32 SDK 5.1.3.240325)
23:18:17.662 -> 00.430 : (284368) Info : ETH PHY Type: W5500(SPI) PHY Addr: 1 CS: 4 IRQ: -1 RST: 13
23:18:17.695 -> 00.441 : (284304) Error : SPI not enabled
23:18:17.727 -> 00.492 : (266028) Info : ETH : MAC: DA:BC:38:F8:AC:6C phy addr: 1 speed: 10M Half Duplex Link: Down
23:18:17.727 -> 00.497 : (261596) Info : Webserver: start

my config

Image Image

TD-er
Core team member
Posts: 8762
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: pb ESP32 + W5500 lite

#10 Post by TD-er » 11 Apr 2024, 23:38

In your initial post you didn't mention the RST would be connected.
Maybe set this one to "not selected" and leave it unconnected?

oldneef
New user
Posts: 7
Joined: 11 Apr 2024, 06:32

Re: pb ESP32 + W5500 lite

#11 Post by oldneef » 11 Apr 2024, 23:42

No difference,

the doc USR-ES1- W5500
Image

INT and RST

TD-er
Core team member
Posts: 8762
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: pb ESP32 + W5500 lite

#12 Post by TD-er » 12 Apr 2024, 00:28

That doc is about W5200, not W5500.

And if you have the RST and IRQ/INT available, please use them both.

Also it seems to have multiple pins for 3V3.
Maybe there is some part for different parts of the circuit, so make sure to connect them both.

TD-er
Core team member
Posts: 8762
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: pb ESP32 + W5500 lite

#13 Post by TD-er » 12 Apr 2024, 13:09

Can you try the latest build I made: https://td-er.nl/ESPEasy/latest/
It should now be more nice about the SPI bus init and no longer throw errors.

PieterS
Normal user
Posts: 87
Joined: 27 Mar 2018, 17:18
Location: NL

Re: pb ESP32 + W5500 lite

#14 Post by PieterS » 12 Apr 2024, 18:49

H Gijs,
Can I use this software also for the ETH01 evo with esp32 C3 and AC energy?

User avatar
Ath
Normal user
Posts: 3531
Joined: 10 Jun 2018, 12:06
Location: NL

Re: pb ESP32 + W5500 lite

#15 Post by Ath » 12 Apr 2024, 20:28

PieterS wrote: 12 Apr 2024, 18:49 H Gijs,
Can I use this software also for the ETH01 evo with esp32 C3 and AC energy?
Yes, but you will need another binary, custom_ESP32c3_4M316k_LittleFS_CDC_ETH, as that's the only ESP32c3 build that supports Ethernet hardware.
/Ton (PayPal.me)

PieterS
Normal user
Posts: 87
Joined: 27 Mar 2018, 17:18
Location: NL

Re: pb ESP32 + W5500 lite

#16 Post by PieterS » 12 Apr 2024, 21:11

That version is not in list of the above link... :? So I think your answer should be No.
Or is there a misunderstanding?

I want to use that pcb to read the Eastron SDM630M

oldneef
New user
Posts: 7
Joined: 11 Apr 2024, 06:32

Re: pb ESP32 + W5500 lite

#17 Post by oldneef » 12 Apr 2024, 21:19

YESSS, I have succeeded......

it's work for me ,

booting verison ESP_Easy_mega_20240412_normal_ESP32_4M316k_LittleFS_ETH

SPI Interface:
Init SPI:use definined :
GPIO23 <--> MOSI
GPIO19 <--> MISO
GPIO18 <--> SCLK
ETHERNET :
Preferred network medium: Ethernet
Ethernet PHY type: W5500 SPI
Ethernet PHY Address: 0 or 1 (same result)
GPIO5 <--> SCS
GPIO ← Ethernet MDIO/IRQ pin: NONE
GPIO26 <--> RESET
Ethernet Clock: External....

Support : https://github.com/PuceBaboon/ESP32_W5500_NTP_CLIENT

Thanks a lot
Last edited by oldneef on 12 Apr 2024, 21:57, edited 1 time in total.

User avatar
Ath
Normal user
Posts: 3531
Joined: 10 Jun 2018, 12:06
Location: NL

Re: pb ESP32 + W5500 lite

#18 Post by Ath » 12 Apr 2024, 21:53

PieterS wrote: 12 Apr 2024, 21:11 That version is not in list of the above link... :? So I think your answer should be No.
yes it is:
Screenshot - 12-04-2024 , 21_22_25.png
Screenshot - 12-04-2024 , 21_22_25.png (12.93 KiB) Viewed 315 times
PieterS wrote: 12 Apr 2024, 21:11 I want to use that pcb to read the Eastron SDM630M
But that plugin isn't included in the Custom build.
Getting that PR local in VSCode, you're able to create a Custom build that includes the Eastron plugin, but if not, you can use this one, that has the Eastron plugin included:
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8762
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: [SOLVED] pb ESP32 + W5500 lite

#19 Post by TD-er » 12 Apr 2024, 23:21

@Pieter,
As you may have seen, I have been working on fixing some issues first before I was ready to make you a build.
Had not forgotten about it, as I did discuss it this morning with Ton.
He now has made a build for you, linked in the post above this one.
Please let me know if that one is working.

PieterS
Normal user
Posts: 87
Joined: 27 Mar 2018, 17:18
Location: NL

Re: [SOLVED] pb ESP32 + W5500 lite

#20 Post by PieterS » 13 Apr 2024, 13:12

TD-er wrote: 12 Apr 2024, 23:21 @Pieter,
As you may have seen, I have been working on fixing some issues first before I was ready to make you a build.
Had not forgotten about it, as I did discuss it this morning with Ton.
He now has made a build for you, linked in the post above this one.
Please let me know if that one is working.
Thnx Gijs for all your good work. My narrative is in the other thread: viewtopic.php?t=10125#p69040

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 14 guests