I am using RMII Interface to communicate with phy ic (lan8720).
enet example in sdk generates clock for enet phy (project: evkmimxrt1060_enet_txrx_transfer)
it is the code used in sdk for clock initialization:
void BOARD_InitModuleClock(void)
{
/* Set 50MHz output clock required by PHY. */
const clock_enet_pll_config_t config = {.enableClkOutput = true, .loopDivider = 1};
CLOCK_InitEnetPll(&config);
/* Output 50M clock to PHY. */
IOMUXC_EnableMode(IOMUXC_GPR, kIOMUXC_GPR_ENET1TxClkOutputDir, true);
}
now i want to use external 50MHz oscillator and share it between ethernet phy and mac.
i guess i need to change
kIOMUXC_GPR_ENET1TxClkOutputDir to kIOMUXC_GPR_ENET1RefClkMode
but is it enough? or should i make other changes to use clock as mac input?
is there any example using clock as input i can referred to? (preferably with my lan8720 module or somewhat like it)