How to connect ESP32 to RMII physical

colman
Posts: 37
Joined: Mon May 30, 2016 7:41 am

How to connect ESP32 to RMII physical

Postby colman » Thu Jan 12, 2017 5:13 am

Are their any reference schematic or document that use the RMII to interface to 10/100 Ethernet Transceiver?

Regards,
Colman

colman
Posts: 37
Joined: Mon May 30, 2016 7:41 am

Re: How to connect ESP32 to RMII physical

Postby colman » Thu Jan 26, 2017 7:54 am

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

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: How to connect ESP32 to RMII physical

Postby WiFive » Fri Jan 27, 2017 12:45 am

I don't think internal clock is supported by Ethernet driver yet

User avatar
rudi ;-)
Posts: 1698
Joined: Fri Nov 13, 2015 3:25 pm

Re: How to connect ESP32 to RMII physical

Postby rudi ;-) » Thu Feb 16, 2017 4:14 am

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 :? )
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

User avatar
rudi ;-)
Posts: 1698
Joined: Fri Nov 13, 2015 3:25 pm

Re: How to connect ESP32 to RMII physical

Postby rudi ;-) » Thu Feb 16, 2017 4:15 am

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 ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

jakehuang
Posts: 12
Joined: Thu Nov 17, 2016 7:12 pm

Re: How to connect ESP32 to RMII physical

Postby jakehuang » Thu Feb 16, 2017 5:32 pm

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!!

User avatar
rudi ;-)
Posts: 1698
Joined: Fri Nov 13, 2015 3:25 pm

Re: How to connect ESP32 to RMII physical

Postby rudi ;-) » Fri Feb 17, 2017 11:10 am

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 ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

User avatar
rudi ;-)
Posts: 1698
Joined: Fri Nov 13, 2015 3:25 pm

Re: How to connect ESP32 to RMII physical

Postby rudi ;-) » Mon Feb 20, 2017 9:16 pm

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 ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

User avatar
rudi ;-)
Posts: 1698
Joined: Fri Nov 13, 2015 3:25 pm

Re: How to connect ESP32 to RMII physical

Postby rudi ;-) » Mon Feb 20, 2017 9:48 pm

RMII (TM) Specification
Attachments
rmii_1_2.pdf
(115.98 KiB) Downloaded 1186 times
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

User avatar
rudi ;-)
Posts: 1698
Joined: Fri Nov 13, 2015 3:25 pm

Re: How to connect ESP32 to RMII physical

Postby rudi ;-) » Mon Feb 20, 2017 11:54 pm

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 19535 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 ;-)
Attachments
LAN8720.pdf
(1.43 MiB) Downloaded 1045 times
tlk110.pdf
(1.43 MiB) Downloaded 932 times
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

Who is online

Users browsing this forum: No registered users and 126 guests