From: Ivan Grokhotkov Date: Mon, 4 Sep 2017 14:43:25 +0000 (+0800) Subject: ethernet: enable EMAC module clock on initialization X-Git-Tag: v3.1-dev~323^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e93c33050e085df1d6cf82b28a81c4cd7afad54d;p=esp-idf ethernet: enable EMAC module clock on initialization --- diff --git a/components/ethernet/emac_main.c b/components/ethernet/emac_main.c index 89e7ae0da3..522ec57a95 100644 --- a/components/ethernet/emac_main.c +++ b/components/ethernet/emac_main.c @@ -37,6 +37,8 @@ #include "esp_eth.h" #include "esp_intr_alloc.h" +#include "driver/periph_ctrl.h" + #include "emac_common.h" #include "emac_desc.h" @@ -1005,6 +1007,7 @@ esp_err_t esp_eth_init_internal(eth_config_t *config) emac_config.emac_phy_power_enable(true); //before set emac reg must enable clk + periph_module_enable(PERIPH_EMAC_MODULE); emac_enable_clk(true); REG_SET_FIELD(EMAC_EX_PHYINF_CONF_REG, EMAC_EX_PHY_INTF_SEL, EMAC_EX_PHY_INTF_RMII);