2021-11-10 12:40 AM
Hi everyone, my name is shekhar. I have to interface Dp83620 with STM32 in RMII mode. CubeMx supports only LAN8742. Can I get support for dp83620 driver code for STM32 in RMII mode? Thank you.
2022-03-23 05:01 PM
If the PHY doesn't have MDIO or it has multiple physical interfaces, then it will require a different code. Otherwise for the standard (R)MII/MDIO PHYs all of the basic functionality is standardized, including software reset, power down, speed/duplex mode selection, auto-negotiation and link state. The only typically necessary thing, that is not standardized, is extended status register, which returns the auto-negotiation result. Those are the three constants to adapt for a particular standard PHY. And, as I said, manufacturers typically keep those registers and bits compatible between their own devices. Of course the Microchip's LAN*** and KSZ*** series have different implementations, because those series come from different manufacturers they acquired, but still the new devices continue the trend of either one or the other series.
The fact that ST cannot make the basic Ethernet and lwIP working for 15 years and counting, but implemented 1000+ code line "chip specific" driver for a functionality that is standardized, just shows how far from the real life usage their incompetent software developers are.
And yes, I know what I'm talking because I actually read the documentation and develop code, not just click CubeMX bloatware generator. Here is an useful information on Ethernet related problems with ST's code:
The most ironic thing is when the people believe that, for example, PHY driver, which really is simple, is "not that simple", but then are completely OK with using ST's totally broken ETH MAC driver and lwIP integration code, both of which indeed are not that simple...
2022-03-23 05:10 PM
And, to get those chips working, none of them actually require anything more than adapting these few constants:
2022-03-25 03:14 AM
Thanks everyone for the help.
2023-06-17 06:11 AM
@Pavel A. wrote:Many PHY drivers can be found in the Keil CMSIS drivers repo .
You can only borrow the .h file with register definition and leave the rest from ST examples, as @piranha advised.
"github.com/ARM-software/CMSIS-Driver/tree/develop/ETH":
404 - page not found