FreeRTOS+TCP in STM32H7 with DP83822 PHY

Hello, I am using already FreeRTOS+TCP in an STM32H743ZIT6 uC with a LAN8742 PHY. For a PCB which is exposed to High Voltage (2kV) I would like to exchange the PHY and use the 10/100 Mbps Ethernet over an SC/ST or SCP fiber optic interface. I am considering for that matter the DP83822 PHY. Is it supported by FreeRTOS+TCP for the STM32H7?, if not, are there other tested alternatives compatible with optical interfaces?


I don’t know if anyone has written and submitted a driver for it, but that is one advantage of FreeRTOS and its support libraries being open source, you can always write your own, and to be nice, submit it so others can use it.

You can see the list of supported/tested PHY IDs here (phyHandling.h):

#define PHY_ID_LAN8742A        0x0007c130
#define PHY_ID_LAN8720         0x0007c0f0

#define PHY_ID_KSZ8041         0x000010A1
#define PHY_ID_KSZ8051         0x000010A1
#define PHY_ID_KSZ8081         0x000010A1

#define PHY_ID_KSZ8863         0x00221430
#define PHY_ID_KSZ8795         0x00221550
#define PHY_ID_KSZ8081MNXIA    0x00221560

#define PHY_ID_DP83848I        0x20005C90
#define PHY_ID_DP83TC811S      0x2000A250

#define PHY_ID_TM4C129X        0x2000A221

#define PHY_ID_MV88E6071       0xFF000710

Not sure if anyone has tested DP83822, but I believe it should be straight forward to test it with the generic driver to configure Ethernet PHY’s in FreeRTOS+TCP.

Thanks for the answers. I’ve seen already the list of PHYs, what I was wondering is if somebody has used already successfully a DP83822. I would have to redesign and relayout the PCB and therefore it would be good to know upfront about previous experiences

As you probably know, Ethernet PHY’s have registers that must be implemented, while other registers are brand specific.

These two registers are optional: PHYSPCS (0x1F) and PHYCR (0x19). The DP83822 does not have PHYSPCS, and it does have PHYCR.

Please find a new version of phyHandling that includes TI’s DP83822: (17.1 KB)

I included both the current driver (“old”), as well as the new version (“new”).

When you start testing, feel free to ask more questions in this post.

The first thing to test will be to check the ID returned by the part, it must be:

#define PHY_ID_DP83822      0x2000A240

Thanks a lot Hein. I will modify the PCB and once tested give feedback in this post. It is going to take a few months surely

Maybe it’s better to get some evaluation board before “modify the PCB”. So you are experienced in this before actually developing. And I would suggest, try STM32CubeMX for the software of Ethernet. It’s wonderful, in my personal opinion.

Kind Regards,