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
Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
1) Is really safe to use ENET_SetMII() function to dynamically change speed and duplex of MAC controller, without disabling it?
-- No, I'm afraid not, it's a risk to do it.
Have a great day,t
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Ok, so what is the best suggested way to manage ENET MAC after PHY re-link?
Hi,
Thanks for your reply.
1) So what is the best suggested way to manage ENET MAC after PHY re-link?
-- It seems like that it needs to reInitialize the ENET module.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------