Hi,
I need to dynamically change MAC controller speed and duplex, based on values auto-negotiated by PHY at each link up.
In iMXRT1176 SDK there is a function named ENET_SetMII(), created exactly with that purpose:
/*!
* brief Sets the ENET MII speed and duplex.
*
* This API is provided to dynamically change the speed and dulpex for MAC.
*
* param base ENET peripheral base address.
* param speed The speed of the RMII mode.
* param duplex The duplex of the RMII mode.
*/
void ENET_SetMII(ENET_Type *base, enet_mii_speed_t speed, enet_mii_duplex_t duplex)
{
I've tried it on my code, and it works like a charm!
But iMXRT1170 Reference Manual states that TCR->FDEN register (changed by ENET_SetMII() function) can be modified only with ECR->ETHEREN = 0 (Ethernet MAC disabled).

So, now the question is: is really safe to use ENET_SetMII() function to dynamically change speed and duplex of MAC controller, without disabling it?
Best regards,
Marco