Olimex Support Forum

Microcontrollers => ESP32 => Topic started by: cbrake on February 11, 2025, 10:50:01 PM

Title: ESP32-POE-WROVER
Post by: cbrake on February 11, 2025, 10:50:01 PM
We are using the ESP32-POE-WROVER with Zephyr and trying to get the clock coming out GPIO0. Do you have and code you can point me to that shows how to do this?

Here is the Zephyr board support we are working on for the ESP32-POE-*

https://github.com/simpleiot/zephyr-siot/tree/main/boards
Title: Re: ESP32-POE-WROVER
Post by: LubOlimex on February 12, 2025, 08:45:38 AM
I see you've added GPIO0 but did you account for the PHY power pin? There is PHY power enable pin GPIO12. Check component "T1" in the schematic.

A lot of other ESP32 boards use GPIO0 for Ethernet clock, maybe if there is already config for another ESP32 board with Ethernet, use that as base just edit the definitions.
Title: Re: ESP32-POE-WROVER
Post by: cbrake on March 22, 2025, 02:25:31 PM
Just getting back to this -- thanks, I'll double check power, but I think it is probably OK as I'm using the same code that already works fine on ESP32-POE (non wrover).

Can you point me to the code in your Arduino or other environments that has this working?
Title: Re: ESP32-POE-WROVER
Post by: LubOlimex on March 24, 2025, 08:15:08 AM
Well, this confirms it then. It is exactly what I wrote in my first response. ESP32-POE and ESP32-POE-WROVER require different code for the Ethernet since the Ethernet clock is different pin. Download and refer to the schematic:

https://github.com/OLIMEX/ESP32-POE/blob/master/HARDWARE/ESP32-PoE-hardware-revision-L1/ESP32-PoE_Rev_L1.pdf

Above the Ethernet chip U4 there is small box that shows how the pinout changes when WROVER is used. Ethernet clock when WROVER is used is GPIO0 (instead of GPIO17 that is used in ESP32-POE).

In Arduino IDE it is sufficient to enable PSRAM. Like this:


I use the ETH8720_LAN example.

(https://i.imgur.com/SK2h8ov.png)

If setting it manually in the code config for WROVER should be:

#ifndef ETH_PHY_TYPE
#define ETH_PHY_TYPE  ETH_PHY_LAN8720
#define ETH_PHY_ADDR  0
#define ETH_PHY_MDC  23
#define ETH_PHY_MDIO  18
#define ETH_PHY_POWER 12
#define ETH_CLK_MODE  ETH_CLOCK_GPIO0_OUT
#endif
Title: Re: ESP32-POE-WROVER
Post by: cbrake on April 08, 2025, 07:32:12 PM
Thanks, I was able to get the Arduino example running. Will do some more digging to figure out how the clock is getting enabled ...


rst:0x1 (POWERON_RESET),boot:0x1b (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:4888
load:0x40078000,len:16516
load:0x40080400,len:4
load:0x40080404,len:3476
entry 0x400805b4
ETH Started
ETH Connected
ETH Got IP
*eth0: <UP,100M,FULL_DUPLEX,AUTO,ADDR:0x0> (DHCPC,GARP,IP_MOD)
      ether 7C:9E:BD:DA:A3:43
      inet 10.0.0.150 netmask 255.255.255.0 broadcast 10.0.0.255
      gateway 10.0.0.1 dns 208.67.222.222


connecting to google.com
HTTP/1.1 301 Moved Permanently
Location: http://www.google.com/
Content-Type: text/html; charset=UTF-8
Content-Security-Policy-Report-Only: object-src 'none';base-uri 'self';script-src 'nonce-R5VUTws1MnTXczbRiLhKYA' 'strict-dynamic' 'report-sample' 'unsafe-eval' 'unsafe-inline' https: http:;report-uri https://csp.withgoogle.com/csp/gws/other-hp
Date: Tue, 08 Apr 2025 16:30:33 GMT
Expires: Thu, 08 May 2025 16:30:33 GMT
Cache-Control: public, max-age=2592000
Server: gws
Content-Length: 219
X-XSS-Protection: 0
X-Frame-Options: SAMEORIGIN

<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>
closing connection
Title: Re: ESP32-POE-WROVER
Post by: LubOlimex on April 09, 2025, 08:12:12 AM
Nice. You just need to change the pin for the Ethernet clock. In boards with WROVER module it is GPIO0 (instead of GPIO17 that is used in ESP32-POE that is with WROOM module). In the code above it looks like this:

- In boards with WROVER module:

#define ETH_CLK_MODE  ETH_CLOCK_GPIO0_OUT

In regular ESP32-POE (WROOM module):

#define ETH_CLK_MODE  ETH_CLOCK_GPIO17_OUT