您好,
我用示波器测量有50MHz的clock信号,VDDCR有1.2V电压输出,lan8720是买的模块,其原理图如下:
烧入esp-idf/examples/ethernet/ethernet示例代码,始终无法获取IP地址且无法ping通,我通过phy_lan8720_dump_registers()函数读取其寄存器值,log信息如下:
Code: Select all
I (189) esp_image: segment 5: paddr=0x0004b514 vaddr=0x40080400 size=0x08170 ( 33136) load
I (216) boot: Loaded app from partition at offset 0x10000
I (216) boot: Disabling RNG early entropy source...
I (217) cpu_start: Pro cpu up.
I (220) cpu_start: Application information:
I (225) cpu_start: Project name: ethernet_demo
I (231) cpu_start: App version: v3.3-beta3-181-g70ecb7e-dirty
I (238) cpu_start: Compile time: Aug 27 2019 15:42:30
I (244) cpu_start: ELF file SHA256: ae28c3e97850e957...
I (250) cpu_start: ESP-IDF: v3.3-beta3-181-g70ecb7e-dirty
I (256) cpu_start: Starting app cpu, entry point is 0x40080eb8
0x40080eb8: call_start_cpu1 at /home/mu/esp/esp-idf/components/esp32/cpu_start.c:267
I (0) cpu_start: App cpu up.
I (267) heap_init: Initializing. RAM available for dynamic allocation:
I (274) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (280) heap_init: At 3FFB4088 len 0002BF78 (175 KiB): DRAM
I (286) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (292) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (299) heap_init: At 40088570 len 00017A90 (94 KiB): IRAM
I (305) cpu_start: Pro cpu start user code
I (323) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (326) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (326) lan8720: LAN8720 Registers:
I (336) lan8720: BCR 0x3100
I (336) lan8720: BSR 0x782d
I (346) lan8720: PHY1 0x0007
I (346) lan8720: PHY2 0xc0f1
I (346) lan8720: ANAR 0x0de1
I (356) lan8720: ANLPAR 0xcde1
I (356) lan8720: ANER 0x0009
I (356) lan8720: MCSR 0x0000
I (366) lan8720: SM 0xffff
I (366) lan8720: SECR 0x0009
I (376) lan8720: CSIR 0xffff
I (376) lan8720: ISR 0xffff
I (376) lan8720: IMR 0x0040
I (386) lan8720: PSCSR 0x0002
I (396) emac: emac reset done
I (396) lan8720: phy_lan8720_get_speed_mode(10)
I (396) eth_example: Ethernet Started
I (4396) lan8720: LAN8720 Registers:
I (4396) lan8720: BCR 0x3100
I (4396) lan8720: BSR 0x782d
I (4396) lan8720: PHY1 0x0007
I (4396) lan8720: PHY2 0xc0f1
I (4396) lan8720: ANAR 0x0de1
I (4406) lan8720: ANLPAR 0xcde1
I (4406) lan8720: ANER 0x000b
I (4416) lan8720: MCSR 0x0000
I (4416) lan8720: SM 0xffff
I (4416) lan8720: SECR 0x0009
I (4426) lan8720: CSIR 0xffff
I (4426) lan8720: ISR 0xffff
I (4426) lan8720: IMR 0x0040
I (4436) lan8720: PSCSR 0x0002
I (4436) lan8720: phy_lan8720_get_speed_mode(100)
I (4446) lan8720: LAN8720 Registers:
I (4446) lan8720: BCR 0x3100
I (4456) lan8720: BSR 0x782d
I (4456) lan8720: PHY1 0x0007
I (4456) lan8720: PHY2 0xc0f1
I (4466) lan8720: ANAR 0x0de1
I (4466) lan8720: ANLPAR 0xcde1
I (4466) lan8720: ANER 0x0009
I (4476) lan8720: MCSR 0x0000
I (4476) lan8720: SM 0xffff
I (4486) lan8720: SECR 0x0009
I (4486) lan8720: CSIR 0xffff
I (4486) lan8720: ISR 0xffff
I (4496) lan8720: IMR 0x0040
I (4496) lan8720: PSCSR 0x0002
I (4496) lan8720: phy_lan8720_get_speed_mode(100)
I (4506) lan8720: LAN8720 Registers:
I (4506) lan8720: BCR 0x3100
I (4516) lan8720: BSR 0x782d
I (4516) lan8720: PHY1 0x0007
I (4526) lan8720: PHY2 0xc0f1
I (4526) lan8720: ANAR 0x0de1
I (4526) lan8720: ANLPAR 0xcde1
I (4536) lan8720: ANER 0x0009
I (4536) lan8720: MCSR 0x0000
I (4546) lan8720: SM 0xffff
I (4546) lan8720: SECR 0x0009
I (4546) lan8720: CSIR 0xffff
I (4556) lan8720: ISR 0xffff
I (4556) lan8720: IMR 0x0040
I (4556) lan8720: PSCSR 0x0002
I (4566) lan8720: phy_lan8720_get_speed_mode(100)
I (4566) lan8720: LAN8720 Registers:
I (4576) lan8720: BCR 0x3100
I (4576) lan8720: BSR 0x782d
I (4586) lan8720: PHY1 0x0007
I (4586) lan8720: PHY2 0xc0f1
I (4586) lan8720: ANAR 0x0de1
I (4596) lan8720: ANLPAR 0xcde1
I (4596) lan8720: ANER 0x0009
I (4596) lan8720: MCSR 0x0000
I (4606) lan8720: SM 0xffff
I (4606) lan8720: SECR 0x0009
I (4616) lan8720: CSIR 0xffff
I (4616) lan8720: ISR 0xffff
I (4616) lan8720: IMR 0x0040
I (4626) lan8720: PSCSR 0x0002
I (4626) lan8720: phy_lan8720_get_speed_mode(100)
I (4636) lan8720: LAN8720 Registers:
I (4636) lan8720: BCR 0x3100
I (4636) lan8720: BSR 0x782d
I (4646) lan8720: PHY1 0x0007
I (4646) lan8720: PHY2 0xc0f1
I (4656) lan8720: ANAR 0x0de1
I (4656) lan8720: ANLPAR 0xcde1
I (4656) lan8720: ANER 0x0009
I (4666) lan8720: MCSR 0x0000
I (4666) lan8720: SM 0xffff
I (4676) lan8720: SECR 0x0009
I (4676) lan8720: CSIR 0xffff
I (4676) lan8720: ISR 0xffff
I (4686) lan8720: IMR 0x0040
I (4686) lan8720: PSCSR 0x0002
I (4686) lan8720: phy_lan8720_get_speed_mode(100)
I (4696) lan8720: LAN8720 Registers:
I (4696) lan8720: BCR 0x3100
I (4706) lan8720: BSR 0x782d
I (4706) lan8720: PHY1 0x0007
I (4716) lan8720: PHY2 0xc0f1
I (4716) lan8720: ANAR 0x0de1
I (4716) lan8720: ANLPAR 0xcde1
I (4726) lan8720: ANER 0x0009
I (4726) lan8720: MCSR 0x0000
I (4726) lan8720: SM 0xffff
I (4736) lan8720: SECR 0x0009
I (4736) lan8720: CSIR 0xffff
I (4746) lan8720: ISR 0xffff
I (4746) lan8720: IMR 0x0040
I (4746) lan8720: PSCSR 0x0002
I (4756) lan8720: phy_lan8720_get_speed_mode(100)
I (4756) eth_example: Ethernet Link Up
请教我该怎么调试解决?谢谢!!!