🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Core2 with W5500 and ESP-IDF

    Core 2
    2
    3
    4.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sheepDog
      last edited by sheepDog

      Hello,
      I used a Core2 with W5500, ESP-IDF V4.3.2 and the express example:
      ../examples/ethernet/basic/main/ethernet_example_main.c

      The program started and I got an reset error:

      ...
      I (369) cpu_start: Starting scheduler on PRO CPU.
      I (0) cpu_start: Starting scheduler on APP CPU.
      E (479) w5500-mac: w5500_reset(228): reset timeout
      E (479) w5500-mac: emac_w5500_init(610): reset w5500 failed
      I (479) gpio: GPIO[34]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
      E (489) esp_eth: esp_eth_driver_install(204): init Mac failed
      

      I used this configuration on menuconfig:

      Espressif IoT Development Framework Configuration
      Ethernet Type (W5500 Module)  --->
      (1) SPI Host Number
      (18) SPI SCLK GPIO number
      (23) SPI MOSI GPIO number
      (19) SPI MISO GPIO number
      (26) SPI CS GPIO number
      (5) SPI clock speed (MHz)
      (34) Interrupt GPIO number
      (13) PHY Reset GPIO number
      (1) PHY Address
      

      I changed ESP-IDF version, I set Reset GPIO number to -1, I changed SPI clock to 20 Mhz... -> Every time I got the same error.

      Do any one have an idea?

      Bye,
      Uwe

      1 Reply Last reply Reply Quote 0
      • felmueF
        felmue
        last edited by

        Hello @sheepDog

        try changing MISO from GPIO19 to GPIO38 and PHY Reset from GPIO13 to GPIO19.

        M5Core2 uses slightly different GPIOs than M5Stack (Base, Gray, Fire) - see here.

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 0
        • S
          sheepDog
          last edited by

          Hello @felmue,

          thank you very much.

          I changed in the file Kconfig.projbuild the range of parameter EXAMPLE_ETH_SPI_MISO_GPIO to 38 and used your values. It worked fine.

          Ethernet Type (W5500 Module)  --->
          (1) SPI Host Number
          (18) SPI SCLK GPIO number
          (23) SPI MOSI GPIO number
          (38) SPI MISO GPIO number
          (26) SPI CS GPIO number
          (5) SPI clock speed (MHz)
          (34) Interrupt GPIO number
          (19) PHY Reset GPIO number
          (1) PHY Address
          

          My challenge was that I hadn't used the Core2-values the last time I made changes. I overlooked this.

          Bye,
          Uwe

          1 Reply Last reply Reply Quote 0
          • First post
            Last post