facing issue in enabling ethernet in esp32 wrover kit with idf version release/4.2

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

Re: facing issue in enabling ethernet in esp32 wrover kit with idf version release/4.2

Postby ESP_ondrej » Wed May 18, 2022 7:58 am

OK, so it seems the PHY Reset is always pulled up (probably, since I don't have the full schematics). It is definitely not connected to GPIO19 since this one is used by TXD[0] RMII signal. If it is really pulled up, please set RST GPIO to "-1" in menuconfig.

Anyway, there is external RMII REF CLK oscillator (Y1) which needs to be enabled. Search to which GPIO is "osc_en" connected. Once you find it, update appropriately your code. The oscillator needs to be enabled prior ESP-IDF Ethernet initialization.

The code could be something like this:

Code: Select all

    // Enable external CLK
    esp_rom_gpio_pad_select_gpio(EXTERNAL_CLK_EN_GPIO);
    gpio_set_direction(EXTERNAL_CLK_EN_GPIO, GPIO_MODE_OUTPUT);
    gpio_set_level(EXTERNAL_CLK_EN_GPIO, 1);
Where EXTERNAL_CLK_EN_GPIO is GPIO number the "osc_en" is connected to.

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

Re: facing issue in enabling ethernet in esp32 wrover kit with idf version release/4.2

Postby ESP_ondrej » Wed May 18, 2022 7:59 am

I also noticed that PHY address should be set to 0 based on comment in the schematics.

kesha.modhia
Posts: 41
Joined: Fri May 13, 2022 12:36 pm

Re: facing issue in enabling ethernet in esp32 wrover kit with idf version release/4.2

Postby kesha.modhia » Wed May 18, 2022 8:46 am

this is the full schematic for NLG1200 I hope this will be helpful for guiding me meanwhile I am doing changes as you mentioned below

[Edit]
Attachment was deleted by administrator.

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

Re: facing issue in enabling ethernet in esp32 wrover kit with idf version release/4.2

Postby ESP_ondrej » Wed May 18, 2022 10:02 am

I see. The general idea is still the same - you need to enable CLK oscillator. However, the way how to do it will be more complicated. You need to enable it via PCAL6416AH IO expander which is controlled via I2C. Therefore, you need to properly configure & initialize I2C bus, study how to control the IO expander and send proper command.

kesha.modhia
Posts: 41
Joined: Fri May 13, 2022 12:36 pm

Re: facing issue in enabling ethernet in esp32 wrover kit with idf version release/4.2

Postby kesha.modhia » Tue May 24, 2022 5:54 am

Okay, Could you please guide me for what reason phy used and what is the role of crystal oscillator in this case, because, from where to configure OSC, that i am not aware of.

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

Re: facing issue in enabling ethernet in esp32 wrover kit with idf version release/4.2

Postby ESP_ondrej » Tue May 24, 2022 8:02 am

Here is some information related to MAC/PHY clocking https://docs.espressif.com/projects/esp ... ac-and-phy.

Just note that you don't need to configure oscillator, you just need to enable it which is done via IO expander in your case.

Who is online

Users browsing this forum: Bing [Bot] and 134 guests