cancel
Showing results for 
Search instead for 
Did you mean: 

ETH custom phy driver modifications

DavidWahlberg
Associate III

Hi forum

I have a custom PCB with STM32F407 and a PHY+switch KSZ8863RLL. I am using CubeMX and cubeide, also LWIP. The physical connections have been verified by Microchip schematic- and board support program.

Instead of using MDIO to interface the PHY, I am using I2C (needed to access the advance registers, and also discussed: https://community.st.com/t5/stm32-mcus-products/eth-anybody-used-ksz8863rll/td-p/645122/page/3).

The switch part is functioning probably and I can successfully read and write registers. But I do not have a working ping up and running, yet. I can't measure any activity on RX/TX lines on the RMII interface.

My understanding is that i need to modify the LAN8742 driver, which is default by Cubemx. When debugging I come across this part:

DavidWahlberg_0-1737922579168.png

in the ethernetif.c file.

My question is, is it enough to rewrite the writeRegister, ReadRegister, Init, etc: 

DavidWahlberg_1-1737922827559.png

to use I2C instead of the MDIO?

Also, is it through the RMII interface that the MAC address of the STM is written (didn't find those lines in LAN8742_init.). 

 

Appreciate any advice to come a bit further to be able to ping my board :)

Best regards, David

0 REPLIES 0