cancel
Showing results for 
Search instead for 
Did you mean: 

I am testing the ethernet on our custom board with a STM32H745IHx MCU attached to an 8740A phy chip. We want to use RMII mode. Currently, I am failing the loopback test. We are not sure why this failure is occurring.

DOrvi.1
Associate II

I put my code on a nucleo board, and the loopback test works, so I don't think it's my code. This problem occurs only on our setup. I have included a schematic of our setup so you can see it clearly.

The loopback mode is enabled by setting the loopback bit in the BCR register. The chip should send back on RXD0 and RXD1 what the MCU sends out on TXD0 and TXD1. I am wondering if we have an issue with the clock. Any ideas?

15 REPLIES 15

> We have checked (and checked again), that it is 50 Mhz

Your earlier post said 25Mhz. Perhaps you've fixed that clock somehow. RMII spec is 2-bit data at up to 50Mhz for 100Mbps operation.

Yes, that seems like a good theory. I am curious why the nucleo succeeds at this while we fail on our board. I looked for differences in the code, but to no avail.

DOrvi.1
Associate II

0693W000000TuquQAC.png

This is a screen capture of a scope trace of TXD1. This signal looks strange. We disconnected TXD1 from the phy so we could see only what was coming out of the MCU. Any ideas why this is happening?

Piranha
Chief II

Check the solder quality. Check the GPIO configuration, probably try different speeds for pins.

And this is what I wrote before the oscilloscope screenshot...

It still can be a software issue. Being able to receive few frames on one board doesn't mean that the code is correct. Do you use any of ST's code? Who wrote the ETH driver and related network code? Have you checked the code for issues described in alister's and my topics? =)

DOrvi.1
Associate II

We cleaned up the signal, and we got loopback to work on a 1.8V nucleo.

The key issue was here:

   GPIO_InitStruct.Pin = ETH_TX_EN_Pin|ETH_TXD1_Pin|ETH_TXD0_Pin;

   GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;

   GPIO_InitStruct.Pull = GPIO_NOPULL;

   GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; <------------------- This line was to low

   GPIO_InitStruct.Alternate = GPIO_AF11_ETH;

   HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);

Once we set the gpio speed to very high, loopback started working at 1.8V on the nucleo

On Monday, our technician comes back to fix the board. We will know more then.

Thanks for everyone's help,

:)

DOrvi.1
Associate II

Ethernet is up a working. All is well. Thanks everyone.

-daveoh