Showing results for 
Search instead for 
Did you mean: 

Custom PCB, STM32H7 and KSZ8863RLL, RMII

Associate II


I have made a custom PCB based on STM32H723VGT MCU and KSZ8863RLL with interface RMII. I have followed the Hardware Design Guide for the KSZ8863. Including 100 Ohm impedance from RJ45 to PHY and 50 Ohm impedance from PHY to STM32. Length matching is also done with meanders. 

Without any configuration from CubeMx I am expecting some activity on the LEDS when I plug a ethernet cable in the RJ45 connector.

Are there anyone with experience with the KSZ8863 3-port switch, that have any suggestions? I have added a picture of the schematic. The crossed is not implemented on the board, so please ignore those.

Any help is much appreciated!

Friendly regards, David



I'll get my H7 + KSZ8863 board in a few weeks...

Have you checked the crystal and all clock settings? There's an extra pdf for it.

And compare your schematics to the KSZ8863 development board (I haven't found a problem on the ETH side).

Associate II

Thank you for the tips! 🙂
And exited to hear about your own project!
By comparing the development board schematic I found it very similar with my own. There are a lot of jumpers on the board to configure, for instance auto-negotiation etc... Not sure what settings is actually important for my application though....

I measure 25MHz on the crystal and 50Mhz on the RMII interface from the PHY. No activity on the differential signals and no led activity either side og the RJ45 cable...

Please update when you receive and test your own PCB 🙂

Getting 50 MHz out of the PHY is a good start.

Can your H7 talk to the PHY via the SMI or I2C interface?

What's connected on the other side of the ethernet cable? Mind that a direct PC connection might not do anything.



I received the boards yesterday.

The good:

I can read and write the PHY's registers.

The bad:

Communication via ethernet is completely... whacky. I see lots of failed retransmissions in Wireshark, most of the time PING fails, so does the access to the STM's webserver.

Pavel A.
Evangelist III

This switch has SPI interface to access the registers. It's very much recommended to use it and get full insight of the switch state, instead of limited MDIO interface.

Yes, I know, sigh... I have it on I2C, but haven't used that yet on H7.


I did such a *** mistake - once more copy & paste, this time from my LAN8742 "driver":

When restarting auto-negotiation, I actually completely reset BCR register and thus turned OFF recommended "HP Auto MDI/MDI-X mode".


Now all is running smoothly - although I could not yet test high data rates.


... and that was seemingly not the solution. :(


Finally found the problem on my board, maybe it's at least related to yours @DavidWahlberg 

I wanted to set it up without I2C or SPI, which means no access to all registers, especially register 198d, which needs bit 3 to be set (default = 0) to use its own RMII reference clock internally.
So maybe your problem is that you have not set that bit, as it looks that you want to use the clock internally.

So I set the strap options so that I can use the clock externally extra routing via R221, which was originally 33 Ohms, as the other RMII resistors.
But even that value is too big, seemingly causes a tad too much phase shift or whatever, replacing the 33R with 0R solved the problem, now it's really running smoothly.

I will switch the interface to I2C, so that I can use the clock internally, because this small change sounds like it's timing-wise "on the edge".