cancel
Showing results for 
Search instead for 
Did you mean: 

Custom PCB, STM32H7 and KSZ8863RLL, RMII

DavidWahlberg
Associate III

Hi

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

 

15 REPLIES 15
DavidWahlberg
Associate III

Hi @LCE 

Happy to hear that you got it working! :)

Some other project came on my desk over the summer, but now I have returned to this project.

I have thought of your suggestion of setting 3-bit in register 198, which would make sense. On my custom PCB I have routed the SMI interface, but as @Pavel A.  mentioned about the limited register access, I am trying getting the SPI interface up and running. For that reason I ordered the ksz8863 daughter board (https://www.microchip.com/en-us/development-tool/ac320004-7) to have access the pins as well as multiple strap options. I have wired it up and made the strap option for [P2LED1, P2LED0] = [1 , 0] to enable SPI slave mode. However, still no good response on the MISO line when trying to read 0x00 register (I am expecting a response of 0x88 according to datasheet).

How far have you come you your project? Can you confirm that my SPI transfer is correct?

 

Friendly regards, David

LCE
Principal

Hello @DavidWahlberg ,

my project is up and running, no problems anymore with the KSZ.

But I use the I2C interface, not SPI, which I have on idea about concerning the KSZ.

Have you checked that the MCU side is working correctly?

Okay, cool! Then I know it is a possible task to have a working connection between ksz8863 and STM32H7 :p

I also have exposed I2C interface on my custom PCB and tried with that interface instead of SPI, still no luck...

code_screendump.png

 

My simple code is above ^. Using the logic analyzer I can see this:

 

logic_analyzer_screendump.png

I never received any ACK from the ksz8863. I am trying to read register 0x01 to return 0x3, as stated in the datasheet.

Can you confirm that I am on the right track, @LCE ?

LCE
Principal

I have no idea about HAL I2C, I can only say that the I2C addresses are correct.

Have you strapped the interface selection pins correctly?

On the logic analyzer we see 0xBE and 0xBF sent out directly after each other, which does not make sense, unless you want to write register 0xBF.

But yeah, first try to get an ACK.

My original design did not have strap, so I have soldered a resistor on 1KOhm as shown in the picture. When pulling reset low, the LEDS on  P2LED1 and P1LED0 lights up and then turns off when releasing nRST pin. I can measure 1.8V on pin 32 and 42. I can measure 25MHz from the crystal and 50Mhz on pin 26. But sadly still cant get a ACK when writing to pin 37 and 36... :( 

Can you confirm the straps for I2C-slave mode?

schematic_strap_options.png

LCE
Principal

Don't have time now, check the DS and the pdf for the eval board.

You might need an extra pull-up an P2LED0.

Here's a screenshot of my working setup:

LCE_0-1725615842190.png