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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-03-11 12:14 PM
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?
- Labels:
-
Ethernet
-
STM32H7 series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-03-12 9:41 PM
> 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-03-13 11:12 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-03-13 11:34 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-03-13 11:43 AM
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? =)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-03-13 1:54 PM
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,
:)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-03-16 12:51 PM
Ethernet is up a working. All is well. Thanks everyone.
-daveoh

- « Previous
-
- 1
- 2
- Next »