|
|
Technical Support
Support Resources
Product Information
|
MDK MIDDLEWARE: Ethernet interface "Link Down"
Information in this knowledgebase article applies to:
- MDK v5.x
- Middleware Network Component v6.x, v7.x or newer versions
QUESTION
While debugging my program using Middleware network component
library, from Network Component Viewer as shown below, as well as
from network debug output, I can see the ethernet interface always
has "Link Down" status. Therefore, the entire Middleware network
stack doesn't work at all, i.e. no data packet can be sent or
received.

What are the possible
reasons/causes for such a link-down issue on the ethernet
interface?
ANSWER
Typical reasons/causes for the ethernet interface staying in the
link-down status are summarized as the following checklist:
-
Check if the RJ-45 ethernet cable is properly
inserted/connected.
-
If one of the existing CMSIS PHY drivers in the CMSIS Driver
pack is used in the project, make sure the one matching the
ethernet PHY controller on your target device is correctly selected
in Manage Run-Time Environment window in µVision.
-
If you have written your own CMSIS PHY driver for the ethernet
PHY controller on your target device, make sure your CMSIS driver
is implemented properly and works as expected, especially the CMSIS
API functions GetLinkState() and GetLinkInfo(). The
CMSIS-Driver_Validation Pack can help you to validate your CMSIS
PHY driver implementation.
-
The ethernet interface, including pins configurations for data
bus (MII or RMII) and management bus, needs to be configured
properly in RTE_Device.h. More details about how to configure these
pins can be found in user manual or reference guide of the
MCU.
-
Read through
Resource Requirements to make sure system resources and
CMSIS-RTOS RTX resources are well allocated and configured for the
Middleware network stack.
-
In the main() function, make sure necessary system peripherals
as well as system clock are initialized correctly.
-
CMSIS-RTOS RTX kernel needs to be initialized properly before
calling netInitialize(). Especially when CMSIS-RTOSv2 RTXv5 is
used, where main() is not a RTX thread by default. In this case
netInitialize() should be called in the "app_main" thread created
from main(), where osKernelInitialize() has been called. Refer to
RTX Migration Guide for more details.
-
The Ethernet driver in some cases might falsely identify that
the link is down due to PHY layer read/write timeout. Increasing
such a PHY layer read/write timeout might overcome it. e.g. if
EMAC_STM32F4xx.c is used, the PHY timeout value can be increased
from the line
#define PHY_TIMEOUT 2U /* PHY Register access timeout in ms */
MORE INFORMATION
SEE ALSO
Last Reviewed: Friday, August 3, 2018
|
|
|