cancel
Showing results for 
Search instead for 
Did you mean: 

Ethernet Configuration using STM32H742VGT6 & KSZ8091RNBCA (PHY) in RMII

Vista123
Associate II

We have designed a boards, main board has STM32H742VGT6 and it is connected to Microchip PHY IC  KSZ8091RNBCA in RMII  Mode, Onboard Clock 25Mhz for PHY) 

we have tried basic configuration such as enabled ETH, LWIP Stack.

we are using STM32CubeIDE 1.13.1 (Windows).Please suggest hardware setting and PHY IC Register setting. 

8 REPLIES 8
LCE
Principal

The mostly used PHY on the STM32 evaluation boards is the LAN8742, so get the check driver for that one.

a) compare datasheets of LAN8742 and KSZ8091, mainly the MDIO registers and each bit.

b) copy and edit LAN8742 driver accordingly.

That shouldn't be too hard, unless the KSZ8091 is something very special. Or you already screwed it with the HW design... ;)

we already compared datasheet of LAN8742 and KSZ8091.MDIO register value are almost same for necessary registers.

Please suggest how to configure setting in .IOC file like CLOCK and Peripherals

what should be the memory address and PHY setting as it indicates it will work only when RAM is Pointing at 0x24000000(What does it mean).

Pavel A.
Evangelist III

STM32H742 is a close relative of very popular STM32H743/753 so try to find and reuse example projects and tutorials for the latter MCUs. The internal SRAM and peripherals are same, only the flash is different IIRC.

 

Hi Pavel A

Can you please share the link of any use case.

 

I don't have ready examples for the PHY. Example projects for LwIP are in the STM32CubeH7 package for STM32H743/753 boards here and here.

 

Hi @Vista123 

Please check the attached tutorial that may help you on the setting of .ioc file and configuration of the Peripherals.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Hi Imen,

Thanks for your response.

I followed the configuration steps as outlined in your PDF, but unfortunately, I’m unable to bring up the interface.

Attached, you’ll find the schematic of our PHY IC for your reference.

Could you kindly suggest any alternative methods to verify whether our hardware is functioning correctly.

Thank you for your assistance.

Vista123_0-1730977406721.png

Vista123_2-1730977842163.png

 

Vista123_1-1730977784404.png

 

 

 

Hello @Vista123 ,

If you want to make sure that the hardware is working correctly you should try to read/write to and from the PHY registers if this operation is successful then normally you should be good to go.

this could be done using 

         (##) HAL_ETH_ReadPHYRegister(): Read a register from an external PHY
         (##) HAL_ETH_WritePHYRegister(): Write data to an external RHY register

Also, the PHY that you are using is not of such difference as pointed out by @LCE so using it should be a straightforward process here are some resources you could look at to inspire:

Solved: STM32H745 not works with KSZ8081RNA - STMicroelectronics Community

Exploring the KSZ8091RNA RMII ethernet PHY | Andys Workshop

fastiuk/stm32f4_ksz8081_eth: Example application to use KSZ8081RNDCA Ethernet PHY chip with STM32F407VG MCU

Regards

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.