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.
2021-11-10 05:12 AM
STM32CubeMX supports interfaces, not individual chips. Since DP83620 has an RMII interface, you should be able to generate code to initialize it with CubeMX.
2021-11-11 02:19 AM
Hi TDK,
Thank you for your support. I have couple of doubts, inorder to initialize dp83620 PHY driver from CubeMx, (#1). Do we need to add driver code of it somewhere in STM32 installation path? Or (#2). CubeMx will detect dp83620 driver automatically from PCB(where it mounted) and install it's drivers automatically and ready to generate the code in RMII mode?..
2021-12-01 10:39 AM
To support a standard PHY on MDIO configuration interface, one just have to define a status register address and speed and duplex bits. And all TI's PHYs are equal in this regard. Therefore one can just use the configuration of DP83848, which can be selected even in the CubeMX broken bloatware generator.
2021-12-03 06:01 AM
Hi Piranha,
Thank you for your suggestions. Will check and let you know.
2022-03-23 04:13 AM
Hi. I am also looking at interfacing to a PHY that is not the LAN8742 on the STM32H753. I tried using CubeMX, but it only gave me the option of the LAN8742 for the Driver_PHY.
Also, searching though the installed software package, I could find files only related to the LAN8742.
Is there anywhere else to go looking for driver code?
Thanks.
2022-03-23 10:02 AM
One literally has to modify 3 constant values, which I named in my previous comment. If one is incapable of doing that, there is no point in trying to deal with networking at all.
2022-03-23 11:36 AM
>>Is there anywhere else to go looking for driver code?
PHY Mechanics only involves a handful of registers, the data sheets should be sufficient to adjust any address/settings unique to any given one following the overall standard.
The trick in general to put the automated tool down, and review the hardware expectations.
Should the autogen tool have more options? Sure I've been pushing ST to have a broader understanding of what customers are using for the best part of a decade, but generally they only automate for hardware they have delivered on DISCO, NUCLEO, EVAL boards, not random hardware picked by the end-customer. So if you stray outside the lines of the "Reference Designs", expect to have to pick up all the data sheets, and work on the plumbing.
2022-03-23 01:45 PM
Thanks, Tesla, it's very helpful to know that it is not as simple as selecting the DP83848 in CubeMX. And migrating the provided LAN8742 driver code does not look too difficult at all.
Thanks, again.
2022-03-23 02:07 PM
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.