How to connect ESP32 to RMII physical
Posted: 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
Regards,
Colman
hi WiFive,I don't think internal clock is supported by Ethernet driver yet
Code: Select all
PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO16_U, FUNC_GPIO16_EMAC_CLK_OUT);
Are their any reference schematic or document that use the RMII to interface to 10/100 Ethernet Transceiver?
Regards,
Colman
Really need more docs and explanations here!!
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);
}
best wishesof EMAC_RX_CRS_DV to GPIO to GPIO27 but the code fails to get an IP. It's stuck at emac reset done
hi
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!!
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!!