Open sirapol opened 6 months ago
I have not tested with your particular pins, but this sketch works fine on our end. I use it almost daily. Can you verify the pins? Also maybe try removing the pull-ups and capacitor from the IRQ line?
I have not tested with your particular pins, but this sketch works fine on our end. I use it almost daily. Can you verify the pins? Also maybe try removing the pull-ups and capacitor from the IRQ line?
This sch, I copy from another product ( Deploy more 5,000pcs ) , But it using IDF.
You are using IDF now too. Just abstracted to Arduino
You are using IDF now too. Just abstracted to Arduino
I not responsible about that project idf. And this project prefer Arduino IDE
What I am trying to say is that Arduino is also using IDF so the code should work and it does work for us. We have tested W5500 quite a bit. This is from the latest 3.0.0-RC3:
[ 1005][V][NetworkEvents.cpp:119] checkForEvent(): Network Event: 1 - ETH_START
ETH Started
[ 2990][V][ETH.cpp:94] _onEthEvent(): eth0 Connected
[ 2994][V][NetworkEvents.cpp:119] checkForEvent(): Network Event: 3 - ETH_CONNECTED
ETH Connected
[ 7077][V][NetworkEvents.cpp:119] checkForEvent(): Network Event: 5 - ETH_GOT_IP
ETH Got IP[2]: 'eth0' (en1)
*eth0: <UP,100M,FULL_DUPLEX,AUTO,ADDR:0x1> (DHCPC,GARP,IP_MOD)
ether 32:C6:F7:F4:2F:8C
inet 192.168.52.161 netmask 255.255.255.0 broadcast 192.168.52.255
gateway 192.168.52.1 dns 8.8.8.8
What I am trying to say is that Arduino is also using IDF so the code should work and it does work for us. We have tested W5500 quite a bit. This is from the latest 3.0.0-RC3:
[ 1005][V][NetworkEvents.cpp:119] checkForEvent(): Network Event: 1 - ETH_START ETH Started [ 2990][V][ETH.cpp:94] _onEthEvent(): eth0 Connected [ 2994][V][NetworkEvents.cpp:119] checkForEvent(): Network Event: 3 - ETH_CONNECTED ETH Connected [ 7077][V][NetworkEvents.cpp:119] checkForEvent(): Network Event: 5 - ETH_GOT_IP ETH Got IP[2]: 'eth0' (en1) *eth0: <UP,100M,FULL_DUPLEX,AUTO,ADDR:0x1> (DHCPC,GARP,IP_MOD) ether 32:C6:F7:F4:2F:8C inet 192.168.52.161 netmask 255.255.255.0 broadcast 192.168.52.255 gateway 192.168.52.1 dns 8.8.8.8
What is your hardware ?
Hello @sirapol
I tried your code verbatim and for me it works too - the W5500 gets an IP address just fine.
I noticed that in your schematic TOCAP (W5500 pin 20) is connected to C13 which is a 10 nF. According to the specifications (see here) it should be a 4.7 uF capacitor.
20 TOCAP - AO External Reference Capacitor This pin must be connected to a 4.7uF capacitor. The trace length to capacitor should be short to stabilize the internal signals
Thanks Felix
This sch, I copy from another product ( Deploy more 5,000pcs ) , But it using IDF.
Wrong circuit design does not get corrected by amount of build pieces ;-)
The wrong choosen AO External Reference Capacitor
does harm.
Also another design tip for future designs... You should separate the power nets for the Ethernet chip and the rest. In your schematic snippets they seem to be using the same nets. (GND and 3V3) So have a single location where both GNDs are connected using for example a beefy 0 Ohm resistor to connect both GNDs and use a ferrite bead to separate both 3V3 nets.
It will most likely not cause these issues (wrong capacitor is more likely as pointed out by others), but it will make it more likely the CE testing will pass without issues.
Also please look into how the metal shield of the RJ45 connector is connected to the rest of the nets. There is lots of info online about this. Just to be sure there won't be any issue when someone is using Ethernet cables with shielding.
After i change C13 to 4.7uF. I error more.
18:05:30.785 -> E (330) w5500.mac: W5500 version mismatched, expected 0x04, got 0x00
18:05:30.785 -> E (330) w5500.mac: emac_w5500_init(825): vefiry chip ID failed
18:05:30.785 -> E (330) esp_eth: esp_eth_driver_install(228): init mac failed
18:05:30.785 -> Fin Setup
Maybe a closer inspection of the W5500 chip to double check it isn't a W6100 or W5100 or some clone?
Maybe using the 4 GPIO mode stabilizies your setup. Just connected a dirt cheap diy W5500 module to an ESP32-C3 (via Dupont wires!!) and it is working rock solid this way.
I investigate with W5500 module it same problem. I try with esp-idf last stable version. It work with W5500 module.
I think my hardware is fault.
I will take time and report again. Can i still open this case ?
Board
ESP32 Dev module.
Device Description
Hardware Configuration
define ETH_PHY_TYPE ETH_PHY_W5500
define ETH_PHY_ADDR 1
define ETH_PHY_CS 27
define ETH_PHY_IRQ 35
define ETH_PHY_RST 15
// SPI pins
define ETH_SPI_SCK 18
define ETH_SPI_MISO 19
define ETH_SPI_MOSI 23
Version
latest development Release Candidate (RC-X)
IDE Name
Arduino 1.8.19
Operating System
Ubuntu
Flash frequency
40Mhz
PSRAM enabled
no
Upload speed
921600
Description
I using example. It can not get dhcp ip from router. I verify same cable to pc. It can get dhcp.
How to solve it ?
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide