2024-01-28 06:19 AM - last edited on 2024-01-30 01:04 AM by SofLit
Hi,
Could anyone help with this problem? Its driving me mad!!!
I have designed an ethernet interface for an F746-100 MCU
I have changed pins to avoid using Port G and I have used the circuit below.
The RJ45 connector is a standard RB1-125BAG1A and the ethernet chip is a LAN8742A
Can anyone tell me if there are any mistakes in this?
I cannot get any connection at all - F746-100 will not ping.
Green LED ON and Yellow LED flashes continuously.
I have an STM32F746 - 144 Nucleo with the same software (apart from the two pins that are changed) -works fine.
The 25MHz xtal works OK (same signal on both boards) and the LAN8742_STATUS_OK returns 0 on both boards when I debug.
There appears to be no errors in the setup LAN8742.c or the ethernetif.c when I debug. This code works OK on the NUCLEO board and I can display a small webpage. Both sets of code use only ETH and LWIP, fixed IP, on a standard Cubeide setup. I assume that the only difference is the two GPIO allocations (PG13>PB12 and PG11>PB11) which I have altered in software.
I have the same sort of signals on both boards on TXP/TXN/RXP/RXN
Can some kind soul tell me if there is anything obviously wrong with my hardware?
Thanks.
Chris
Solved! Go to Solution.
2024-02-01 06:55 AM
JOY of JOYS!!!
A *** mistake -
4 resistors on Ethernet circuitry were incorrect.
I am not too familiar with SMD markings, and I wrongly assumed '4992' was 49.9 ohms, when in fact they are 49.9Kohms.
It was not possible to measure them on the board since they were across a coil.
I replaced them with 4 standard resistors and ethernet works OK!
Thank you all so much for helping me.
The circuit and the project I uploaded are guaranteed to work, so hopefully this will help others.
Chris
2024-01-28 07:27 AM
Hi @clock.1166 ,
Here are few hypothesis :
Hope it helps you .
Cheers,
STOne-32
2024-01-28 09:55 AM
Thanks for your help STOne, but I have checked the software and I cant find anything amiss. The clock (25Mhz) and reference (50Mhz) are identical to the NUCLEO F746, and so are the TXP/TXN/RXP/RXN as far as I can ascertain.
I've tried running the board at a lower main clock speed, but how do you set the I/O speed as you've mentioned?
I just wish there was a simple ETH+LWIP project around for an F746 LQFP-100. I haven't managed to find one.
I also cannot understand what the flashing yellow LED means - any ideas?
I am not an expert in high frequency design and I am struggling!
Chris
2024-01-28 10:16 AM
Setting I/O speed is done when the port B is configured to Alternate function and should be in Output speed parameter if you can share your Ports settings versus Our LQFP144 Nucleo code software .
Let us know,
STOne-32
2024-01-28 12:21 PM
One interesting thing: If I completely erase the STM32F746-100, the Leds act in exactly the same fashion when the port is connected to the router.
Green LED ON and Yellow LED flashes continuously.
Can I deduce anything from that?
Thanks.
Chris
2024-01-28 12:55 PM - edited 2024-01-29 04:20 AM
May be to double check the PHY configuration and signals on the PCB to the RJ45 Connector. Not sure what is the cause here . @STea your help is appreciated ;)
ciao
STOne-32
2024-01-29 08:03 AM
Hello @clock.1166 ,
Implementing the Ethernet on custom board can be a challenging task and i will try to help you to get over this problem .
first i need some clarification with previous conversation with @STOne-32 .
adding on that i have to ask you some further questions to verify the root cause of this problem:
hope you will get back to me with some good news or helpful information to get it working soon.
BR
2024-01-30 12:31 AM
Thanks STea/Stone-32,
I have placed (I hope) a better image of my circuit. Any suggestions would be helpful!
I have a feeling that this is the source of all my problems, although I dont know enough about LWIP and ETH to be certain.
I cannot find any similar project using STM32F746-100. It would be helpful if I could.
1. I compared the clocks from an STM32F746 nucleo (which works fine with the same basic software) to my board with a scope. The reference clock(50Mhz) and the xtal clock (25Mhz) looked almost exactly the same - 25.010 and 25.1 MHz - same amplitude. The signals on TXP/TXN/RXP/RXN also look the same.
2. Yes - GPIO's set to very high.
Simple webserver for Nucleo F746 generated from cube IDE attached (http://192.168.1.218/)
F746-100 generated same way - obviously ETH pins are slightly different.
I will work on the other questions today.
Thanks.
2024-01-30 12:48 AM
25.1 MHz - that on the board that is not working?
50 MHz clock is generated by the PHY?
After your GPIO switch - checked all the alternate function numbers?
PCB layout: around the crystal and clocks all clean? No crazy routing of the high speed signals?
PHY: Read all the registers and check / compare to datasheet.
2024-01-30 02:35 AM
Possibly slightly better image?