Part Number: TMDS64EVM
Other Parts Discussed in Thread: SYSCONFIG,
I am writing custom firmware for the PRU, and have so far been unable to read from the PHY using the MDIO register interface. I can see my updates to the MDIO registers enabling the MDIO and setting other configuration settings, but everytime I try and read from a PHY register using the MDIO USER ACCESS registers, the GO bit it never being cleared after I set my commands, so I wait indefinitely for a reply. I tried running more or less similar custom driver code on the R5F with equally unsuccessful results.
Trying to isolate the issue, I am now using a empty demo project for the R5F core 0 I cloned out of the SDK examples, and using the sysconfig tool to generate the interface/driver code between the Arm core MDIO interface and the PHY device. I am getting the exact same problem - GO bit in the MDIO USER ACCESS register never clears so I never get any reply.
My sysconfig file creates a single PRU (ICSS) TI Driver instance on ICSSG1, and a single ETHPHY (ICSS-EMAC) TI board driver, also for ICSSG1. Stepping through the code I can see the PHY device drives called and the MDIO init routine called. I can see the MDIO CONTROL register set properly during the init call. I add a call to my main code:
ETHPHY_command(gEthPhyHandle[0], ETHPHY_CMD_SOFT_RESTART, &status, 1);
Tracing down the call tree, I get stuck at the same point in the PHY Read Reg routine, GO bit never clearing.
I noticed that with the settings as defined now, there are no pinmux configurations generated for interfacing with the PHY device (RMII pins or MDIO pins). Not sure if this may have something to do with the problem? Any other suggestions?