16
NXPTM M522XX, KINETIS and i.MX RT / fnCheckEthLinkState and KSZ8081
« on: June 09, 2015, 08:53:41 AM »
Hey Mark,
we had some problem with our network activity led and the KSZ8081 PHY. The LINK_UP was detected just fine but LINK_DOWN was never received.
In the function fnCheckEthLinkState(void) in kinetis.c you mask the register value with PHY_LINK_STATE_CHANGE which is defined as:
This breaks the following else case:
Regards
Paul
we had some problem with our network activity led and the KSZ8081 PHY. The LINK_UP was detected just fine but LINK_DOWN was never received.
In the function fnCheckEthLinkState(void) in kinetis.c you mask the register value with PHY_LINK_STATE_CHANGE which is defined as:
Code: [Select]
#define PHY_LINK_STATE_CHANGE (PHY_LINK_UP_INT | PHY_LINK_DOWN_INT)
when using the KSZ8081.This breaks the following else case:
Code: [Select]
else if (PHY_LINK_DOWN_INT & usInterrupt) { // {27} add else so that the LINK UP event is not overwritten to UNKNOWN
If the define is changed toCode: [Select]
#define PHY_LINK_STATE_CHANGE PHY_LINK_UP_INT
the LINK_DOWN event is detected.Regards
Paul