ethernet example is not working

ESP_ondrej
Posts: 211
Joined: Fri May 07, 2021 10:35 am

Re: ethernet example is not working

Postby ESP_ondrej » Fri Mar 25, 2022 3:53 pm


xien551
Posts: 69
Joined: Wed Feb 02, 2022 4:04 am

Re: ethernet example is not working

Postby xien551 » Sat Mar 26, 2022 12:26 am

Is it this one? https://www.waveshare.com/dp83848-ethernet-board.htm
-----------------------------------------
Yes.

xien551
Posts: 69
Joined: Wed Feb 02, 2022 4:04 am

Re: ethernet example is not working

Postby xien551 » Sat Mar 26, 2022 12:42 am

I think I have found the difference between 8720 and 83848. The latter only support the 25MHz referce clock for 100Mhz transmission. However, the gpio17 output 50MHz clock, which only matches 8720.

xien551
Posts: 69
Joined: Wed Feb 02, 2022 4:04 am

Re: ethernet example is not working

Postby xien551 » Sat Mar 26, 2022 12:49 am

I am wrong. Please ignore the statement above.

ESP_ondrej
Posts: 211
Joined: Fri May 07, 2021 10:35 am

Re: ethernet example is not working

Postby ESP_ondrej » Mon Mar 28, 2022 6:51 am

I checked the schematics related to your dp83848 dev board. The board has 50 MHz oscillator so you need to connect "OSCIN" pin of P2 header to ESP32 GPIO0 and configure as CLKIN in the IDF.

xien551
Posts: 69
Joined: Wed Feb 02, 2022 4:04 am

Re: ethernet example is not working

Postby xien551 » Mon Mar 28, 2022 8:19 am

Well, I found esp32 got the IP address, but I can not ping the IP.
-----------------------------------------------------------------------------
I (367) system_api: Base MAC address is not set
I (377) system_api: read default base MAC address from EFUSE
I (397) esp_eth.netif.netif_glue: 24:0a:c4:05:7b:bf
I (397) esp_eth.netif.netif_glue: ethernet attached to netif
I (2497) eth_example: Ethernet Started
I (2497) eth_example: Ethernet Link Up
I (2497) eth_example: Ethernet HW Addr 24:0a:c4:05:7b:bf
I (3867) esp_netif_handlers: eth ip: 192.168.1.100, mask: 255.255.255.0, gw: 192.168.1.1
I (3867) eth_example: Ethernet Got IP Address
I (3867) eth_example: ~~~~~~~~~~~
I (3867) eth_example: ETHIP:192.168.1.100
I (3877) eth_example: ETHMASK:255.255.255.0
I (3877) eth_example: ETHGW:192.168.1.1
I (3887) eth_example: ~~~~~~~~~~~
------------------------------------------------------------------------------


I think there should be something wrong with gpio0, maybe it enter the low-power mode again, and the serial output cannot be acquired. I have replace the Ai-thinker board with ESP board. If I power the board with standalone power, I could not see it in the router's administration interface, maybe it not work due to low-power mode.
-----------------------------------------------------------------------------------------------------------
--- WARNING: GDB cannot open serial ports accessed as COMx
--- Using \\.\COM5 instead...
--- idf_monitor on \\.\COM5 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
---------------------------------------
So, could GPIO0 be replaced by other pins?

ESP_ondrej
Posts: 211
Joined: Fri May 07, 2021 10:35 am

Re: ethernet example is not working

Postby ESP_ondrej » Mon Mar 28, 2022 8:38 am

I already mentioned it... GPIO0 is also used as bootstrap pin. Therefore, when you connect something to it and you don't ensure proper logic level at this input during power up, the ESP32 may enter DOWNLOAD mode. And that's exactly what happened to you when you connect OSCIN to GPIO0, you have 50:50 chance that the ESP32 is booted to download mode. It is not low power mode. Sorry I didn't realized it at the first glance.
Therefore one of the solutions could be de-soldering R1 and so disconnecting the external oscillator, then connecting "OSCIN" pin to GPIO16/17 and configuring IDF Ethernet to CLKOUT.


- "Well, I found esp32 got the IP address, but I can not ping the IP."
Did you ping the correct address? Is you PC from you are pinging in the same subnetwork? The Ethernet interface should be OK get IP address from DHCP server.

xien551
Posts: 69
Joined: Wed Feb 02, 2022 4:04 am

Re: ethernet example is not working

Postby xien551 » Mon Mar 28, 2022 8:59 am

:roll: Well, I choose to buy two LAN8720 again, becasue the resistor is too small for me to re-solder.

Thanks. I think there should be a switch for next version of development board.

ESP_ondrej
Posts: 211
Joined: Fri May 07, 2021 10:35 am

Re: ethernet example is not working

Postby ESP_ondrej » Tue Mar 29, 2022 7:11 am

Ok, just make sure you handle the LAN8720 clock properly too.

Just a note regarding the switch on the DP83848 dev board, that's not likely to happen... It seems it fits its original use case, it would be more expensive and having a switch on CLK lane could possibly also cause problems with signal integrity.

leandroVanolli
Posts: 1
Joined: Tue Mar 12, 2024 1:48 am

Re: ethernet example is not working

Postby leandroVanolli » Tue Mar 12, 2024 2:02 am

My board brings a LAN8720A and I receiving the "wrong chip ID" message on ESP32 log.

I connected all the pins properly, both RMII pins and serial pins.
As my board has an oscillator, I'm reading the PHY clock using GPIO0.

My Ethernet board is properly supplied.

I read someone on this forum with the same problem, and he said that he had to "power on the eth". What does it means? Is that to supply 3v3 to the board?

Who is online

Users browsing this forum: No registered users and 15 guests