Page 1 of 2

How to connect ESP32 to RMII physical

Posted: Thu Jan 12, 2017 5:13 am
by colman
Are their any reference schematic or document that use the RMII to interface to 10/100 Ethernet Transceiver?

Regards,
Colman

Re: How to connect ESP32 to RMII physical

Posted: Thu Jan 26, 2017 7:54 am
by colman
Can anyone answer this? I want to configuration the EMAC to RMII interface with internal clock source and output the 50MHz RMII CLK to GPIO16/EMAC_CLK_OUT pin, is it possible?

Regards,
Colman

Re: How to connect ESP32 to RMII physical

Posted: Fri Jan 27, 2017 12:45 am
by WiFive
I don't think internal clock is supported by Ethernet driver yet

Re: How to connect ESP32 to RMII physical

Posted: Thu Feb 16, 2017 4:14 am
by rudi ;-)
WiFive wrote:I don't think internal clock is supported by Ethernet driver yet
hi WiFive,
do you know more about?
is this a silicon V1 problem or other?
viewtopic.php?f=12&t=367&p=5277#p5277

in test :

Code: Select all

PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO16_U, FUNC_GPIO16_EMAC_CLK_OUT);
this is not working just in time to use
what reason is for this?

best wishes
rudi ;-)

( .. and now we must paused unknowed again :? )

Re: How to connect ESP32 to RMII physical

Posted: Thu Feb 16, 2017 4:15 am
by rudi ;-)
colman wrote:Are their any reference schematic or document that use the RMII to interface to 10/100 Ethernet Transceiver?

Regards,
Colman

ESP Guys, please!
push!


best wishes
rudi ;-)

Re: How to connect ESP32 to RMII physical

Posted: Thu Feb 16, 2017 5:32 pm
by jakehuang
It is the ethernet PHY module I used, which has an 50Mhz crystal on board. I hooked it up
https://www.aliexpress.com/store/produc ... 94874.html

I used connections as laid out in example code here.
https://github.com/espressif/esp-idf/bl ... net_main.c

with addition of EMAC_RX_CRS_DV to GPIO to GPIO27 but the code fails to get an IP. It's stuck at emac reset done

void eth_gpio_config_rmii(void)
{
//txd0 to gpio19 ,can not change
PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO19_U, FUNC_GPIO19_EMAC_TXD0);
//tx_en to gpio21 ,can not change
PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO21_U, FUNC_GPIO21_EMAC_TX_EN);
//txd1 to gpio22 , can not change
PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO22_U, FUNC_GPIO22_EMAC_TXD1);
//rxd0 to gpio25 , can not change
gpio_set_direction(25, GPIO_MODE_INPUT);
//rxd1 to gpio26 ,can not change
gpio_set_direction(26, GPIO_MODE_INPUT);
//rmii clk ,can not change
gpio_set_direction(0, GPIO_MODE_INPUT);

//mdc to gpio23
gpio_matrix_out(PIN_SMI_MDC, EMAC_MDC_O_IDX, 0, 0);
//mdio to gpio18
gpio_matrix_out(PIN_SMI_MDIO, EMAC_MDO_O_IDX, 0, 0);
gpio_matrix_in(PIN_SMI_MDIO, EMAC_MDI_I_IDX, 0);
}
Really need more docs and explanations here!!

Re: How to connect ESP32 to RMII physical

Posted: Fri Feb 17, 2017 11:10 am
by rudi ;-)
hi

how looks your addition code:
of EMAC_RX_CRS_DV to GPIO to GPIO27 but the code fails to get an IP. It's stuck at emac reset done
best wishes
rudi ;-)

Re: How to connect ESP32 to RMII physical

Posted: Mon Feb 20, 2017 9:16 pm
by rudi ;-)
jakehuang wrote:
It is the ethernet PHY module I used, which has an 50Mhz crystal on board. I hooked it up
https://www.aliexpress.com/store/produc ... 94874.html

I used connections as laid out in example code here.
https://github.com/espressif/esp-idf/bl ... net_main.c

with addition of EMAC_RX_CRS_DV to GPIO to GPIO27 but the code fails to get an IP. It's stuck at emac reset done
..
Really need more docs and explanations here!!
hi

which ESP32 modul you use? ( DevKitC V1/V2, WRover V1/V2, Other/own ..)

best wishes
rudi ;-)

Re: How to connect ESP32 to RMII physical

Posted: Mon Feb 20, 2017 9:48 pm
by rudi ;-)
RMII (TM) Specification

Re: How to connect ESP32 to RMII physical

Posted: Mon Feb 20, 2017 11:54 pm
by rudi ;-)
jakehuang wrote:
It is the ethernet PHY module I used, which has an 50Mhz crystal on board. I hooked it up
https://www.aliexpress.com/store/produc ... 94874.html

I used connections as laid out in example code here.
https://github.com/espressif/esp-idf/bl ... net_main.c

with addition of EMAC_RX_CRS_DV to GPIO to GPIO27 but the code fails to get an IP. It's stuck at emac reset done


Really need more docs and explanations here!!

hi

only for the protocoll :)

you have a LAN8720-ETH Modul
you use the ethernet example code with TLK110 ETH and config, cmd and pins
ESP32_phy_tlk110.jpg
ESP32_phy_tlk110.jpg (95.47 KiB) Viewed 21878 times

be sure you use the right configs for LAN8720 example RMII_CLK_enable is difference CMD to TLK110

you must read the LAN8720 Datasheet and the TLK110 Datasheet and you can then create the header for the LAN8720 ETH Board with right cmd bits

i ordered same LAN8720 ETH module now, hope i get it fast next days.
btw, here are the tlk110 evb's

best wishes
rudi ;-)