Can't flash when PHY reset gpio is configured

glrtheil
Posts: 61
Joined: Tue Dec 07, 2021 2:48 pm

Can't flash when PHY reset gpio is configured

Postby glrtheil » Tue Sep 13, 2022 5:12 pm

Using ESP32-WROOM-32UE. We've got a new board we've put a w5500 ethernet chip on and while it works great, there's an issue with flashing the board once the W5500 is active.

The W5500 reset pin is tied to GPIO 32. When configuring PHY, I provide this code

Code: Select all

eth_phy_config_t phy_config = ETH_PHY_DEFAULT_CONFIG();
phy_config.phy_addr = 1;
phy_config.reset_gpio_num = GPIO_NUM_32;
When this code is run, and while running I try to flash the ESP again, it will not flash unless I force it into bootloader mode. However, if I comment phy_config.reset_gpio_num, everything works as normal. Speaking to the guy who designed the hardware, we're a bit confused why I can't flash once that GPIO is set.

Is there any way past this issue without redesigning the board to use a different GPIO for PHY reset? I can provide schematics if necessary.

glrtheil
Posts: 61
Joined: Tue Dec 07, 2021 2:48 pm

Re: Can't flash when PHY reset gpio is configured

Postby glrtheil » Fri Sep 16, 2022 1:33 pm

Bump. Badly need to figure out what the issue is here, and how we can overcome it.

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

Re: Can't flash when PHY reset gpio is configured

Postby ESP_ondrej » Tue Sep 20, 2022 7:59 am

When this code is run, and while running I try to flash the ESP again, it will not flash unless I force it into bootloader mode.
Do you mean, you are not able to run `idf.py flash` and you need to press buttons or whatever to get into the download mode?

Could you please share your schematics?

glrtheil
Posts: 61
Joined: Tue Dec 07, 2021 2:48 pm

Re: Can't flash when PHY reset gpio is configured

Postby glrtheil » Wed Sep 21, 2022 6:40 pm

ESP_ondrej wrote:
Tue Sep 20, 2022 7:59 am
When this code is run, and while running I try to flash the ESP again, it will not flash unless I force it into bootloader mode.
Do you mean, you are not able to run `idf.py flash` and you need to press buttons or whatever to get into the download mode?

Could you please share your schematics?
That's correct. Typically running flash just works since we added the 10uF capacitor on our board from EN to GND. However, once phy_config.reset_gpio_num is set to the correct GPIO, I can no longer flash without forcing the chip into bootloader mode.

Here's the schematic:
Attachments
ethernet_schematic.jpg
Ethernet Schematic w5500
ethernet_schematic.jpg (234.65 KiB) Viewed 2258 times
esp_schematic.jpg
esp_schematic
esp_schematic.jpg (162.86 KiB) Viewed 2258 times

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: Can't flash when PHY reset gpio is configured

Postby ESP_Sprite » Thu Sep 22, 2022 12:15 am

I think your schematic pulls EN up hard when IO32 is high (through D1). I don't see your autoreset circuit, but it may not be able to sink enough current to get EN below the reset threshold with IO32 being high.

glrtheil
Posts: 61
Joined: Tue Dec 07, 2021 2:48 pm

Re: Can't flash when PHY reset gpio is configured

Postby glrtheil » Mon Sep 26, 2022 2:44 pm

Thanks for the info. We will research this and see if it's something we can overcome on the firmware side.

Who is online

Users browsing this forum: No registered users and 108 guests