This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM6442: Bug in AM64X MCU+ SDK with ENET_PHY_IOCTL commands?

Part Number: AM6442
Other Parts Discussed in Thread: SK-AM64B

Hi,

Using the SK-AM64B eval board and AM64x MCU+ SDK 8.5.0.24, I'm trying to use the IOCTL command "ENET_PHY_IOCTL_PRINT_REGS" in order to test low level MDIO comm with the Ethernet PHY. In my application code, I'm calling:

EnetPhy_GenericInArgs genInArgs;
genInArgs.macPort = gEnetLpbk.macPort;
ENET_IOCTL_SET_IN_ARGS(&prms, &genInArgs);
ENET_IOCTL(gEnetLpbk.hEnet, gEnetLpbk.coreId, ENET_PHY_IOCTL_PRINT_REGS, &prms, status);

It doesn't work. In Debug I can trace the code going to the file cpsw.c, function Cpsw_registerIoctlHandler(). The switch goes to "case ENET_IOCTL_PHY_BASE", and then calls the following line (line 1777 of cpsw.c)

status = EnetPhyMdioDflt_ioctl(hCpsw->hPhy[portNum], ENET_PHY_IOCTL_REGISTER_HANDLER, prms)

But in function EnetPhyMdioDflt_ioctl(), the cmd ENET_PHY_IOCTL_REGISTER_HANDLER is not handled and it returns an error.

In Debug UART, I have the following message: "Cpsw_registerIoctlHandler: Failed to register IOCTL handler: -3, 100090d, 700C6F81"

Can you please confirm if it is a bug in MCU+ SDK files and let me know if there is workaround I can use to access the command ENET_PHY_IOCTL_PRINT_REGS?

Thanks,

Stephane

  • For info, I added this code in EnetPhyMdioDflt_ioctl() and I rebuilded the SDK enet-cpsw library, it now seems to work fine with my application code, I can print the MDIO register of the PHY. 

    		case ENET_PHY_IOCTL_REGISTER_HANDLER:
    		{
                status = EnetPhyMdioDflt_ioctl_handler_ENET_PHY_IOCTL_REGISTER_HANDLER(hPhy, prms);
    		}
    		break;

    I hope the next version of the MCU+ SDK will have the fix!