ESP32 以太网启动失败问题
Posted: Thu Nov 25, 2021 1:42 am
硬件:ESP32-WROVER-B + IP101
IDF版本:v4.1
系统:windown + ESP Command Prompt
配置如下:
打了3塊板使用 example/ethernet/basic 例程進行測試
LOG如下:
No.1:
PHY init 失敗.
No.2
拿不到IP
No.3
燒錄完的前幾次可以成功, 斷電一段時間後上電就會像No.1一樣的現象.
有人可以幫忙告知上述問題怎麼產生的, 以及如何解決嗎?
3塊板子同樣的code卻有截然不同的結果, 沒有頭緒.
感謝閱文的各位.
IDF版本:v4.1
系统:windown + ESP Command Prompt
配置如下:
打了3塊板使用 example/ethernet/basic 例程進行測試
LOG如下:
No.1:
- [0;32mI (12) [boot] ESP-IDF v4.1.1-1-g599be5b9bc-dirty 2nd stage bootloader[0m
- [0;32mI (12) [boot] compile time 17:54:32[0m
- [0;32mI (12) [boot] chip revision: 1[0m
- [0;32mI (16) [boot_comm] chip revision: 1, min. bootloader chip revision: 0[0m
- [0;32mI (23) [boot.esp32] SPI Speed : 40MHz[0m
- [0;32mI (28) [boot.esp32] SPI Mode : DIO[0m
- [0;32mI (32) [boot.esp32] SPI Flash Size : 16MB[0m
- [0;32mI (37) [boot] Enabling RNG early entropy source...[0m
- [0;32mI (42) [boot] Partition Table:[0m
- [0;32mI (46) [boot] ## Label Usage Type ST Offset Length[0m
- [0;32mI (53) [boot] 0 nvs WiFi data 01 02 00009000 00006000[0m
- [0;32mI (61) [boot] 1 phy_init RF data 01 01 0000f000 00001000[0m
- [0;32mI (69) [boot] 2 factory factory app 00 00 00010000 00100000[0m
- [0;32mI (76) [boot] End of partition table[0m
- [0;32mI (80) [boot_comm] chip revision: 1, min. application chip revision: 0[0m
- [0;32mI (88) [esp_image] segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x0d3a0 ( 54176) map[0m
- [0;32mI (117) [esp_image] segment 1: paddr=0x0001d3c8 vaddr=0x3ffb0000 size=0x02074 ( 8308) load[0m
- [0;32mI (121) [esp_image] segment 2: paddr=0x0001f444 vaddr=0x40080000 size=0x00404 ( 1028) load[0m
- [0;32mI (125) [esp_image] segment 3: paddr=0x0001f850 vaddr=0x40080404 size=0x007c8 ( 1992) load[0m
- [0;32mI (134) [esp_image] segment 4: paddr=0x00020020 vaddr=0x400d0020 size=0x2f07c (192636) map[0m
- [0;32mI (215) [esp_image] segment 5: paddr=0x0004f0a4 vaddr=0x40080bcc size=0x09ad8 ( 39640) load[0m
- [0;32mI (239) [boot] Loaded app from partition at offset 0x10000[0m
- [0;32mI (239) [boot] Disabling RNG early entropy source...[0m
- [0;32mI (240) [cpu_start] Pro cpu up.[0m
- [0;32mI (243) [cpu_start] Application information:[0m
- [0;32mI (248) [cpu_start] Project name: ethernet_basic[0m
- [0;32mI (254) [cpu_start] App version: 781b332-dirty[0m
- [0;32mI (260) [cpu_start] ELF file SHA256: 10e45567284965c7...[0m
- [0;32mI (266) [cpu_start] ESP-IDF: v4.1.1-1-g599be5b9bc-dirty[0m
- [0;32mI (272) [cpu_start] Starting app cpu, entry point is 0x40081270[0m
- [0;32mI (0) [cpu_start] App cpu up.[0m
- [0;32mI (283) [heap_init] Initializing. RAM available for dynamic allocation:[0m
- [0;32mI (290) [heap_init] At 3FFAE6E0 len 00001920 (6 KiB): DRAM[0m
- [0;32mI (296) [heap_init] At 3FFB37E0 len 0002C820 (178 KiB): DRAM[0m
- [0;32mI (302) [heap_init] At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM[0m
- [0;32mI (309) [heap_init] At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM[0m
- [0;32mI (315) [heap_init] At 4008A6A4 len 0001595C (86 KiB): IRAM[0m
- [0;32mI (322) [cpu_start] Pro cpu start user code[0m
- [0;32mI (340) [spi_flash] detected chip: generic[0m
- [0;32mI (341) [spi_flash] flash io: dio[0m
- [0;32mI (341) [cpu_start] Starting scheduler on PRO CPU.[0m
- [0;32mI (0) [cpu_start] Starting scheduler on APP CPU.[0m
- [0;32mI (359) [system_api] Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
- [0;31mE (459) [ip101] ip101_pwrctl(296): power up timeout[0m
- [0;31mE (459) [ip101] ip101_init(336): power control failed[0m
- [0;31mE (459) [esp_eth] esp_eth_driver_install(199): init phy failed[0m
- ESP_ERROR_CHECK failed: esp_err_t 0xffffffff (ESP_FAIL) at 0x400848dc
- file: "../main/ethernet_example_main.c" line 125
- func: app_main
- expression: esp_eth_driver_install(&config, ð_handle)
- ELF file SHA256: 10e45567284965c7
- Backtrace: 0x40084241:0x3ffb5690 0x400848df:0x3ffb56b0 0x400d5379:0x3ffb56d0 0x400d202a:0x3ffb5740 0x40084c4d:0x3ffb5760
No.2
- [0;32mI (12) [boot] ESP-IDF v4.1.1-1-g599be5b9bc-dirty 2nd stage bootloader[0m
- [0;32mI (12) [boot] compile time 17:54:32[0m
- [0;32mI (12) [boot] chip revision: 1[0m
- [0;32mI (16) [boot_comm] chip revision: 1, min. bootloader chip revision: 0[0m
- [0;32mI (23) [boot.esp32] SPI Speed : 40MHz[0m
- [0;32mI (28) [boot.esp32] SPI Mode : DIO[0m
- [0;32mI (32) [boot.esp32] SPI Flash Size : 16MB[0m
- [0;32mI (37) [boot] Enabling RNG early entropy source...[0m
- [0;32mI (42) [boot] Partition Table:[0m
- [0;32mI (46) [boot] ## Label Usage Type ST Offset Length[0m
- [0;32mI (53) [boot] 0 nvs WiFi data 01 02 00009000 00006000[0m
- [0;32mI (61) [boot] 1 phy_init RF data 01 01 0000f000 00001000[0m
- [0;32mI (69) [boot] 2 factory factory app 00 00 00010000 00100000[0m
- [0;32mI (76) [boot] End of partition table[0m
- [0;32mI (80) [boot_comm] chip revision: 1, min. application chip revision: 0[0m
- [0;32mI (88) [esp_image] segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x0d3d0 ( 54224) map[0m
- [0;32mI (117) [esp_image] segment 1: paddr=0x0001d3f8 vaddr=0x3ffb0000 size=0x02074 ( 8308) load[0m
- [0;32mI (121) [esp_image] segment 2: paddr=0x0001f474 vaddr=0x40080000 size=0x00404 ( 1028) load[0m
- [0;32mI (125) [esp_image] segment 3: paddr=0x0001f880 vaddr=0x40080404 size=0x00798 ( 1944) load[0m
- [0;32mI (134) [esp_image] segment 4: paddr=0x00020020 vaddr=0x400d0020 size=0x2f07c (192636) map[0m
- [0;32mI (216) [esp_image] segment 5: paddr=0x0004f0a4 vaddr=0x40080b9c size=0x09b20 ( 39712) load[0m
- [0;32mI (239) [boot] Loaded app from partition at offset 0x10000[0m
- [0;32mI (239) [boot] Disabling RNG early entropy source...[0m
- [0;32mI (240) [cpu_start] Pro cpu up.[0m
- [0;32mI (243) [cpu_start] Application information:[0m
- [0;32mI (248) [cpu_start] Project name: ethernet_basic[0m
- [0;32mI (254) [cpu_start] App version: 781b332-dirty[0m
- [0;32mI (260) [cpu_start] Compile time: Nov 23 2021 17:53:45[0m
- [0;32mI (266) [cpu_start] ELF file SHA256: 5a035742e77154c0...[0m
- [0;32mI (272) [cpu_start] ESP-IDF: v4.1.1-1-g599be5b9bc-dirty[0m
- [0;32mI (279) [cpu_start] Starting app cpu, entry point is 0x40081274[0m
- [0;32mI (0) [cpu_start] App cpu up.[0m
- [0;32mI (289) [heap_init] Initializing. RAM available for dynamic allocation:[0m
- [0;32mI (296) [heap_init] At 3FFAE6E0 len 00001920 (6 KiB): DRAM[0m
- [0;32mI (302) [heap_init] At 3FFB37E0 len 0002C820 (178 KiB): DRAM[0m
- [0;32mI (309) [heap_init] At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM[0m
- [0;32mI (315) [heap_init] At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM[0m
- [0;32mI (322) [heap_init] At 4008A6BC len 00015944 (86 KiB): IRAM[0m
- [0;32mI (328) [cpu_start] Pro cpu start user code[0m
- [0;32mI (346) [spi_flash] detected chip: generic[0m
- [0;32mI (347) [spi_flash] flash io: dio[0m
- [0;32mI (347) [cpu_start] Starting scheduler on PRO CPU.[0m
- [0;32mI (0) [cpu_start] Starting scheduler on APP CPU.[0m
- [0;32mI (365) [system_api] Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
- [0;32mI (385) [esp_eth.netif.glue] 40:f5:20:7b:75:f3[0m
- [0;32mI (385) [esp_eth.netif.glue] ethernet attached to netif[0m
- [0;32mI (395) [eth_example] Ethernet Started[0m
- [0;32mI (14395) [eth_example] Ethernet Link Up[0m
- [0;32mI (14395) [eth_example] Ethernet HW Addr 40:f5:20:7b:75:f3[0m
- [0;32mI (64395) [eth_example] Ethernet Link Down[0m
No.3
- [0;32mI (12) [boot] ESP-IDF v4.1.1-1-g599be5b9bc-dirty 2nd stage bootloader[0m
- [0;32mI (12) [boot] compile time 17:54:32[0m
- [0;32mI (12) [boot] chip revision: 1[0m
- [0;32mI (16) [boot_comm] chip revision: 1, min. bootloader chip revision: 0[0m
- [0;32mI (23) [boot.esp32] SPI Speed : 40MHz[0m
- [0;32mI (28) [boot.esp32] SPI Mode : DIO[0m
- [0;32mI (32) [boot.esp32] SPI Flash Size : 16MB[0m
- [0;32mI (37) [boot] Enabling RNG early entropy source...[0m
- [0;32mI (42) [boot] Partition Table:[0m
- [0;32mI (46) [boot] ## Label Usage Type ST Offset Length[0m
- [0;32mI (53) [boot] 0 nvs WiFi data 01 02 00009000 00006000[0m
- [0;32mI (61) [boot] 1 phy_init RF data 01 01 0000f000 00001000[0m
- [0;32mI (69) [boot] 2 factory factory app 00 00 00010000 00100000[0m
- [0;32mI (76) [boot] End of partition table[0m
- [0;32mI (80) [boot_comm] chip revision: 1, min. application chip revision: 0[0m
- [0;32mI (88) [esp_image] segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x0d3a0 ( 54176) map[0m
- [0;32mI (117) [esp_image] segment 1: paddr=0x0001d3c8 vaddr=0x3ffb0000 size=0x02074 ( 8308) load[0m
- [0;32mI (121) [esp_image] segment 2: paddr=0x0001f444 vaddr=0x40080000 size=0x00404 ( 1028) load[0m
- [0;32mI (125) [esp_image] segment 3: paddr=0x0001f850 vaddr=0x40080404 size=0x007c8 ( 1992) load[0m
- [0;32mI (134) [esp_image] segment 4: paddr=0x00020020 vaddr=0x400d0020 size=0x2f07c (192636) map[0m
- [0;32mI (215) [esp_image] segment 5: paddr=0x0004f0a4 vaddr=0x40080bcc size=0x09ad8 ( 39640) load[0m
- [0;32mI (239) [boot] Loaded app from partition at offset 0x10000[0m
- [0;32mI (239) [boot] Disabling RNG early entropy source...[0m
- [0;32mI (240) [cpu_start] Pro cpu up.[0m
- [0;32mI (243) [cpu_start] Application information:[0m
- [0;32mI (248) [cpu_start] Project name: ethernet_basic[0m
- [0;32mI (254) [cpu_start] App version: 781b332-dirty[0m
- [0;32mI (260) [cpu_start] ELF file SHA256: 10e45567284965c7...[0m
- [0;32mI (266) [cpu_start] ESP-IDF: v4.1.1-1-g599be5b9bc-dirty[0m
- [0;32mI (272) [cpu_start] Starting app cpu, entry point is 0x40081270[0m
- [0;32mI (0) [cpu_start] App cpu up.[0m
- [0;32mI (283) [heap_init] Initializing. RAM available for dynamic allocation:[0m
- [0;32mI (290) [heap_init] At 3FFAE6E0 len 00001920 (6 KiB): DRAM[0m
- [0;32mI (296) [heap_init] At 3FFB37E0 len 0002C820 (178 KiB): DRAM[0m
- [0;32mI (302) [heap_init] At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM[0m
- [0;32mI (309) [heap_init] At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM[0m
- [0;32mI (315) [heap_init] At 4008A6A4 len 0001595C (86 KiB): IRAM[0m
- [0;32mI (322) [cpu_start] Pro cpu start user code[0m
- [0;32mI (340) [spi_flash] detected chip: generic[0m
- [0;32mI (341) [spi_flash] flash io: dio[0m
- [0;32mI (341) [cpu_start] Starting scheduler on PRO CPU.[0m
- [0;32mI (0) [cpu_start] Starting scheduler on APP CPU.[0m
- [0;32mI (359) [system_api] Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
- [0;32mI (379) [esp_eth.netif.glue] 40:f5:20:7b:7c:1b[0m
- [0;32mI (379) [esp_eth.netif.glue] ethernet attached to netif[0m
- [0;32mI (389) [eth_example] Ethernet Started[0m
- [0;32mI (12389) [eth_example] Ethernet Link Up[0m
- [0;32mI (12389) [eth_example] Ethernet HW Addr 40:f5:20:7b:7c:1b[0m
- [0;32mI (20849) [esp_netif_handlers] eth ip: 192.168.68.232, mask: 255.255.255.0, gw: 192.168.68.1[0m
- [0;32mI (20849) [eth_example] Ethernet Got IP Address[0m
- [0;32mI (20849) [eth_example] ~~~~~~~~~~~[0m
- [0;32mI (20849) [eth_example] ETHIP:192.168.68.232[0m
- [0;32mI (20859) [eth_example] ETHMASK:255.255.255.0[0m
- [0;32mI (20859) [eth_example] ETHGW:192.168.68.1[0m
- [0;32mI (20869) [eth_example] ~~~~~~~~~~~[0m
- [0;32mI (26389) [eth_example] Ethernet Link Down[0m
有人可以幫忙告知上述問題怎麼產生的, 以及如何解決嗎?
3塊板子同樣的code卻有截然不同的結果, 沒有頭緒.
感謝閱文的各位.