ESP32 ethernet example is not working

nick.pt
Posts: 3
Joined: Tue Nov 23, 2021 7:29 am

ESP32 ethernet example is not working

Postby nick.pt » Thu Nov 25, 2021 5:39 am

Hi anyone,
I use same 3 pcb boards to test the ethernet sample code,
But the results of the 3 pcb boards are different.

The following is my development environment and settings.
Hardware: ESP32-WROVER-B + IP101
IDF Version:v4.1
OS:windown + ESP Command Prompt
Configuration:
Snipaste_2021-11-25_09-24-14.png
Snipaste_2021-11-25_09-24-14.png (41.26 KiB) Viewed 2335 times
Snipaste_2021-11-25_09-23-42.png
Snipaste_2021-11-25_09-23-42.png (48.03 KiB) Viewed 2335 times
Log info:
No.1: PHY init fail
  1.     [0;32mI (12) [boot] ESP-IDF v4.1.1-1-g599be5b9bc-dirty 2nd stage bootloader[0m
  2.     [0;32mI (12) [boot] compile time 17:54:32[0m
  3.     [0;32mI (12) [boot] chip revision: 1[0m
  4.     [0;32mI (16) [boot_comm] chip revision: 1, min. bootloader chip revision: 0[0m
  5.     [0;32mI (23) [boot.esp32] SPI Speed      : 40MHz[0m
  6.     [0;32mI (28) [boot.esp32] SPI Mode       : DIO[0m
  7.     [0;32mI (32) [boot.esp32] SPI Flash Size : 16MB[0m
  8.     [0;32mI (37) [boot] Enabling RNG early entropy source...[0m
  9.     [0;32mI (42) [boot] Partition Table:[0m
  10.     [0;32mI (46) [boot] ## Label            Usage          Type ST Offset   Length[0m
  11.     [0;32mI (53) [boot]  0 nvs              WiFi data        01 02 00009000 00006000[0m
  12.     [0;32mI (61) [boot]  1 phy_init         RF data          01 01 0000f000 00001000[0m
  13.     [0;32mI (69) [boot]  2 factory          factory app      00 00 00010000 00100000[0m
  14.     [0;32mI (76) [boot] End of partition table[0m
  15.     [0;32mI (80) [boot_comm] chip revision: 1, min. application chip revision: 0[0m
  16.     [0;32mI (88) [esp_image] segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x0d3a0 ( 54176) map[0m
  17.     [0;32mI (117) [esp_image] segment 1: paddr=0x0001d3c8 vaddr=0x3ffb0000 size=0x02074 (  8308) load[0m
  18.     [0;32mI (121) [esp_image] segment 2: paddr=0x0001f444 vaddr=0x40080000 size=0x00404 (  1028) load[0m
  19.     [0;32mI (125) [esp_image] segment 3: paddr=0x0001f850 vaddr=0x40080404 size=0x007c8 (  1992) load[0m
  20.     [0;32mI (134) [esp_image] segment 4: paddr=0x00020020 vaddr=0x400d0020 size=0x2f07c (192636) map[0m
  21.     [0;32mI (215) [esp_image] segment 5: paddr=0x0004f0a4 vaddr=0x40080bcc size=0x09ad8 ( 39640) load[0m
  22.     [0;32mI (239) [boot] Loaded app from partition at offset 0x10000[0m
  23.     [0;32mI (239) [boot] Disabling RNG early entropy source...[0m
  24.     [0;32mI (240) [cpu_start] Pro cpu up.[0m
  25.     [0;32mI (243) [cpu_start] Application information:[0m
  26.     [0;32mI (248) [cpu_start] Project name:     ethernet_basic[0m
  27.     [0;32mI (254) [cpu_start] App version:      781b332-dirty[0m
  28.     [0;32mI (260) [cpu_start] ELF file SHA256:  10e45567284965c7...[0m
  29.     [0;32mI (266) [cpu_start] ESP-IDF:          v4.1.1-1-g599be5b9bc-dirty[0m
  30.     [0;32mI (272) [cpu_start] Starting app cpu, entry point is 0x40081270[0m
  31.     [0;32mI (0) [cpu_start] App cpu up.[0m
  32.     [0;32mI (283) [heap_init] Initializing. RAM available for dynamic allocation:[0m
  33.     [0;32mI (290) [heap_init] At 3FFAE6E0 len 00001920 (6 KiB): DRAM[0m
  34.     [0;32mI (296) [heap_init] At 3FFB37E0 len 0002C820 (178 KiB): DRAM[0m
  35.     [0;32mI (302) [heap_init] At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM[0m
  36.     [0;32mI (309) [heap_init] At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM[0m
  37.     [0;32mI (315) [heap_init] At 4008A6A4 len 0001595C (86 KiB): IRAM[0m
  38.     [0;32mI (322) [cpu_start] Pro cpu start user code[0m
  39.     [0;32mI (340) [spi_flash] detected chip: generic[0m
  40.     [0;32mI (341) [spi_flash] flash io: dio[0m
  41.     [0;32mI (341) [cpu_start] Starting scheduler on PRO CPU.[0m
  42.     [0;32mI (0) [cpu_start] Starting scheduler on APP CPU.[0m
  43.     [0;32mI (359) [system_api] Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
  44.     [0;31mE (459) [ip101] ip101_pwrctl(296): power up timeout[0m
  45.     [0;31mE (459) [ip101] ip101_init(336): power control failed[0m
  46.     [0;31mE (459) [esp_eth] esp_eth_driver_install(199): init phy failed[0m
  47.     ESP_ERROR_CHECK failed: esp_err_t 0xffffffff (ESP_FAIL) at 0x400848dc
  48.     file: "../main/ethernet_example_main.c" line 125
  49.     func: app_main
  50.     expression: esp_eth_driver_install(&config, &eth_handle)
  51.      
  52.     ELF file SHA256: 10e45567284965c7
  53.      
  54.     Backtrace: 0x40084241:0x3ffb5690 0x400848df:0x3ffb56b0 0x400d5379:0x3ffb56d0 0x400d202a:0x3ffb5740 0x40084c4d:0x3ffb5760
No.2 : Can not get the ip
  1.     [0;32mI (12) [boot] ESP-IDF v4.1.1-1-g599be5b9bc-dirty 2nd stage bootloader[0m
  2.     [0;32mI (12) [boot] compile time 17:54:32[0m
  3.     [0;32mI (12) [boot] chip revision: 1[0m
  4.     [0;32mI (16) [boot_comm] chip revision: 1, min. bootloader chip revision: 0[0m
  5.     [0;32mI (23) [boot.esp32] SPI Speed      : 40MHz[0m
  6.     [0;32mI (28) [boot.esp32] SPI Mode       : DIO[0m
  7.     [0;32mI (32) [boot.esp32] SPI Flash Size : 16MB[0m
  8.     [0;32mI (37) [boot] Enabling RNG early entropy source...[0m
  9.     [0;32mI (42) [boot] Partition Table:[0m
  10.     [0;32mI (46) [boot] ## Label            Usage          Type ST Offset   Length[0m
  11.     [0;32mI (53) [boot]  0 nvs              WiFi data        01 02 00009000 00006000[0m
  12.     [0;32mI (61) [boot]  1 phy_init         RF data          01 01 0000f000 00001000[0m
  13.     [0;32mI (69) [boot]  2 factory          factory app      00 00 00010000 00100000[0m
  14.     [0;32mI (76) [boot] End of partition table[0m
  15.     [0;32mI (80) [boot_comm] chip revision: 1, min. application chip revision: 0[0m
  16.     [0;32mI (88) [esp_image] segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x0d3d0 ( 54224) map[0m
  17.     [0;32mI (117) [esp_image] segment 1: paddr=0x0001d3f8 vaddr=0x3ffb0000 size=0x02074 (  8308) load[0m
  18.     [0;32mI (121) [esp_image] segment 2: paddr=0x0001f474 vaddr=0x40080000 size=0x00404 (  1028) load[0m
  19.     [0;32mI (125) [esp_image] segment 3: paddr=0x0001f880 vaddr=0x40080404 size=0x00798 (  1944) load[0m
  20.     [0;32mI (134) [esp_image] segment 4: paddr=0x00020020 vaddr=0x400d0020 size=0x2f07c (192636) map[0m
  21.     [0;32mI (216) [esp_image] segment 5: paddr=0x0004f0a4 vaddr=0x40080b9c size=0x09b20 ( 39712) load[0m
  22.     [0;32mI (239) [boot] Loaded app from partition at offset 0x10000[0m
  23.     [0;32mI (239) [boot] Disabling RNG early entropy source...[0m
  24.     [0;32mI (240) [cpu_start] Pro cpu up.[0m
  25.     [0;32mI (243) [cpu_start] Application information:[0m
  26.     [0;32mI (248) [cpu_start] Project name:     ethernet_basic[0m
  27.     [0;32mI (254) [cpu_start] App version:      781b332-dirty[0m
  28.     [0;32mI (260) [cpu_start] Compile time:     Nov 23 2021 17:53:45[0m
  29.     [0;32mI (266) [cpu_start] ELF file SHA256:  5a035742e77154c0...[0m
  30.     [0;32mI (272) [cpu_start] ESP-IDF:          v4.1.1-1-g599be5b9bc-dirty[0m
  31.     [0;32mI (279) [cpu_start] Starting app cpu, entry point is 0x40081274[0m
  32.     [0;32mI (0) [cpu_start] App cpu up.[0m
  33.     [0;32mI (289) [heap_init] Initializing. RAM available for dynamic allocation:[0m
  34.     [0;32mI (296) [heap_init] At 3FFAE6E0 len 00001920 (6 KiB): DRAM[0m
  35.     [0;32mI (302) [heap_init] At 3FFB37E0 len 0002C820 (178 KiB): DRAM[0m
  36.     [0;32mI (309) [heap_init] At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM[0m
  37.     [0;32mI (315) [heap_init] At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM[0m
  38.     [0;32mI (322) [heap_init] At 4008A6BC len 00015944 (86 KiB): IRAM[0m
  39.     [0;32mI (328) [cpu_start] Pro cpu start user code[0m
  40.     [0;32mI (346) [spi_flash] detected chip: generic[0m
  41.     [0;32mI (347) [spi_flash] flash io: dio[0m
  42.     [0;32mI (347) [cpu_start] Starting scheduler on PRO CPU.[0m
  43.     [0;32mI (0) [cpu_start] Starting scheduler on APP CPU.[0m
  44.     [0;32mI (365) [system_api] Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
  45.     [0;32mI (385) [esp_eth.netif.glue] 40:f5:20:7b:75:f3[0m
  46.     [0;32mI (385) [esp_eth.netif.glue] ethernet attached to netif[0m
  47.     [0;32mI (395) [eth_example] Ethernet Started[0m
  48.     [0;32mI (14395) [eth_example] Ethernet Link Up[0m
  49.     [0;32mI (14395) [eth_example] Ethernet HW Addr 40:f5:20:7b:75:f3[0m
  50.     [0;32mI (64395) [eth_example] Ethernet Link Down[0m
No.3: After flash, it can work fine. But when power-off and keep some times, it will become the same symptom as No.1
  1.     [0;32mI (12) [boot] ESP-IDF v4.1.1-1-g599be5b9bc-dirty 2nd stage bootloader[0m
  2.     [0;32mI (12) [boot] compile time 17:54:32[0m
  3.     [0;32mI (12) [boot] chip revision: 1[0m
  4.     [0;32mI (16) [boot_comm] chip revision: 1, min. bootloader chip revision: 0[0m
  5.     [0;32mI (23) [boot.esp32] SPI Speed      : 40MHz[0m
  6.     [0;32mI (28) [boot.esp32] SPI Mode       : DIO[0m
  7.     [0;32mI (32) [boot.esp32] SPI Flash Size : 16MB[0m
  8.     [0;32mI (37) [boot] Enabling RNG early entropy source...[0m
  9.     [0;32mI (42) [boot] Partition Table:[0m
  10.     [0;32mI (46) [boot] ## Label            Usage          Type ST Offset   Length[0m
  11.     [0;32mI (53) [boot]  0 nvs              WiFi data        01 02 00009000 00006000[0m
  12.     [0;32mI (61) [boot]  1 phy_init         RF data          01 01 0000f000 00001000[0m
  13.     [0;32mI (69) [boot]  2 factory          factory app      00 00 00010000 00100000[0m
  14.     [0;32mI (76) [boot] End of partition table[0m
  15.     [0;32mI (80) [boot_comm] chip revision: 1, min. application chip revision: 0[0m
  16.     [0;32mI (88) [esp_image] segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x0d3a0 ( 54176) map[0m
  17.     [0;32mI (117) [esp_image] segment 1: paddr=0x0001d3c8 vaddr=0x3ffb0000 size=0x02074 (  8308) load[0m
  18.     [0;32mI (121) [esp_image] segment 2: paddr=0x0001f444 vaddr=0x40080000 size=0x00404 (  1028) load[0m
  19.     [0;32mI (125) [esp_image] segment 3: paddr=0x0001f850 vaddr=0x40080404 size=0x007c8 (  1992) load[0m
  20.     [0;32mI (134) [esp_image] segment 4: paddr=0x00020020 vaddr=0x400d0020 size=0x2f07c (192636) map[0m
  21.     [0;32mI (215) [esp_image] segment 5: paddr=0x0004f0a4 vaddr=0x40080bcc size=0x09ad8 ( 39640) load[0m
  22.     [0;32mI (239) [boot] Loaded app from partition at offset 0x10000[0m
  23.     [0;32mI (239) [boot] Disabling RNG early entropy source...[0m
  24.     [0;32mI (240) [cpu_start] Pro cpu up.[0m
  25.     [0;32mI (243) [cpu_start] Application information:[0m
  26.     [0;32mI (248) [cpu_start] Project name:     ethernet_basic[0m
  27.     [0;32mI (254) [cpu_start] App version:      781b332-dirty[0m
  28.     [0;32mI (260) [cpu_start] ELF file SHA256:  10e45567284965c7...[0m
  29.     [0;32mI (266) [cpu_start] ESP-IDF:          v4.1.1-1-g599be5b9bc-dirty[0m
  30.     [0;32mI (272) [cpu_start] Starting app cpu, entry point is 0x40081270[0m
  31.     [0;32mI (0) [cpu_start] App cpu up.[0m
  32.     [0;32mI (283) [heap_init] Initializing. RAM available for dynamic allocation:[0m
  33.     [0;32mI (290) [heap_init] At 3FFAE6E0 len 00001920 (6 KiB): DRAM[0m
  34.     [0;32mI (296) [heap_init] At 3FFB37E0 len 0002C820 (178 KiB): DRAM[0m
  35.     [0;32mI (302) [heap_init] At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM[0m
  36.     [0;32mI (309) [heap_init] At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM[0m
  37.     [0;32mI (315) [heap_init] At 4008A6A4 len 0001595C (86 KiB): IRAM[0m
  38.     [0;32mI (322) [cpu_start] Pro cpu start user code[0m
  39.     [0;32mI (340) [spi_flash] detected chip: generic[0m
  40.     [0;32mI (341) [spi_flash] flash io: dio[0m
  41.     [0;32mI (341) [cpu_start] Starting scheduler on PRO CPU.[0m
  42.     [0;32mI (0) [cpu_start] Starting scheduler on APP CPU.[0m
  43.     [0;32mI (359) [system_api] Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
  44.     [0;32mI (379) [esp_eth.netif.glue] 40:f5:20:7b:7c:1b[0m
  45.     [0;32mI (379) [esp_eth.netif.glue] ethernet attached to netif[0m
  46.     [0;32mI (389) [eth_example] Ethernet Started[0m
  47.     [0;32mI (12389) [eth_example] Ethernet Link Up[0m
  48.     [0;32mI (12389) [eth_example] Ethernet HW Addr 40:f5:20:7b:7c:1b[0m
  49.     [0;32mI (20849) [esp_netif_handlers] eth ip: 192.168.68.232, mask: 255.255.255.0, gw: 192.168.68.1[0m
  50.     [0;32mI (20849) [eth_example] Ethernet Got IP Address[0m
  51.     [0;32mI (20849) [eth_example] ~~~~~~~~~~~[0m
  52.     [0;32mI (20849) [eth_example] ETHIP:192.168.68.232[0m
  53.     [0;32mI (20859) [eth_example] ETHMASK:255.255.255.0[0m
  54.     [0;32mI (20859) [eth_example] ETHGW:192.168.68.1[0m
  55.     [0;32mI (20869) [eth_example] ~~~~~~~~~~~[0m
  56.     [0;32mI (26389) [eth_example] Ethernet Link Down[0m
Because the conditions of the 3 pcbs are different, so I have no idea how to resolve it.
Can someone provide assistance to troubleshoot the error?
Thanks for your reading.

Who is online

Users browsing this forum: ESP_Roland, Majestic-12 [Bot] and 94 guests