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.
Hi Adrien,
Because you mentioned the s2 ethernet switch, I assume, that you have HDK card - so the setup process should be ok.
Could you check the value of baseAddr variable please?
"while((HWREG(baseAddr + MDIO_USERACCESS0) & MDIO_USERACCESS0_GO) == MDIO_USERACCESS0_GO)
{
} /* Wait */
Best Regards: Szilárd
Hi Anthony,
Thanks for your reply.
I am using the HDK with TMS570LC4357 and PHYdp83640. You are saying that even with HDK there is a problem of compatibility with LC4357 pinout ?
Best Regards,
Adrien
Ok I missed the S2 note at the bottom.
I've run this example before on the HDKs without issue ... so not sure where the issue would be.
Make sure you *did not* apply the RMII mode patch that is mentioned on that page. That patch is only for CNCD boards.
Now I'd suggest double checking the pin muxing again, especially the 'Input Muxing' part is easy to miss.
You also need to allow for time between power on reset and starting to talk to the PHY in MDIO mode. The example may not have this delay built in if you just run from a power on reset. If you are using CCS in debug mode though you wouldn't be seeing this problem.
You can easily manually check the MDIO port by opening the Register view in CCS, see below.
Just put your phy address, register address, read or write in the appropriate fields, then when configured set 'Go' and the transfer will happen.
You can check on the oscilloscope what is happening on the MDIO and MDC pins to see if it looks correct..
One other thing that could be wrong... the PHY address on the MDIO bus is set by straps (pins that are pulled up/down). I think on this board a few of the strap pins have a pull in one direction on the MCU and opposite direction on the phy. So maybe on your particular board the phy address is different..
You can try the different addresses and see if the phy is responding on a different one than the example uses.
Then there would be ways through software to make this more robust (set the straps using GIO mode, then reset the phy for example..)
-anthony
Hi Adrien,
The baseaddr is good. Meanwhile Anthony write down everything about the topic.
When i tried lwip demo, it worked - so please double check your settings: pinmux (mainly for mdio pins), clocking, and the phy address, but as I remember
(maybe i am wrong) the lwip demo start searching for phy circuit on mdio bus.
If you want to check your hardware, there is a preconfigured demo project for freertos+tcp.
Regards Szilárd