When link status is changed and detected by network driver, you can call _nx_ip_driver_link_status_event() to notify NetX Duo and set nx_interface_link_up to actual value.
NetX Duo driver & link-down state
Hi All,
I am working at project with STM32H7 and NetX Duo. At current version of Ethernet driver from ST (X-CUBE-AZRTOS-H7 v3.0.0) is not handled by any way state when link is disconnected. Link status variable nx_interface_link_up is set at "Enable Link" (nx_ip_driver_command=NX_LINK_ENABLE) and "Disable Link" (nx_ip_driver_command=NX_LINK_DISABLE). But there is no modification of this variable when phy-link goes down.
Should be control of this variable implemented into driver, when I detect link down via MDIO interface? Or it is OK do not set nx_interface_link_up when link is physical down (e.g. disconnected Ethernet cable)? In case of control of nx_interface_link_up should be implemented, what is best place inside driver (NX_LINK_GET_STATUS, NX_LINK_USER_COMMAND, etc.)?
Thank for answer
Regards,
Jan
-
Tiejun Zhou 1,126 Reputation points Microsoft Employee
2023-02-06T08:15:22.0733333+00:00