NetX Duo driver & link-down state

Jan Dospěl 50 Reputation points
2023-01-31T11:51:53.9266667+00:00

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

Azure RTOS
Azure RTOS
An Azure embedded development suite including a small but powerful operating system for resource-constrained devices.
324 questions
{count} votes

Accepted answer
  1. Tiejun Zhou 1,126 Reputation points Microsoft Employee
    2023-02-06T08:15:22.0733333+00:00

    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.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful