LAN8720 does not respond on MDIO depending on uC startup
I have a strange behaviour on a LAN8720 connected to a LPC1768 controller by NXP.
In principle, everything is working fine. I run the firmware on the LPC1768, the PHY is initialized and running. I am using RMII and the REFCLK signal of the PHY to clock the RMII on the microcontroller. The nRST pin of the PHY is connected to the RSTOUT of the microcontroller.
Here's the thing: I added a bootloader, which I reduced to the usual init code in the assembly startup and the application call.
I uploaded bootloader and app without a power cycle using a debugger hardware and still it runs fine.
BUT: when I power cycle, the PHY is not initialized properly. It starts up, the LAN LEDs are flashing as they should but I can not communicate via MDIO. I compared scope signals between working and not working version and see that clock and MDIO from microcontroller to PHY are fine, only the response on read requests is always 0xFFFF, so the PHY does not drive the MDIO line.
When I run the firmware without the bootloader, everything works when I do a powercycle.
So, my conclusion is that this is a problem caused by the power on condition only when I use the bootloader, since it fails only, when I do a power cycle. It appears as if the PHY is in an undefined state or something.
Any ideas where to look at?
post edited by Hfuhruhurr - 2017/12/13 07:04:15