Skip to main content
Explorer II
January 28, 2024
Solved

stm32f746 ETHERNET issue

  • January 28, 2024
  • 15 replies
  • 10955 views

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

    This topic has been closed for replies.
    Best answer by clock.1166

    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

    image.png

    15 replies

    Graduate II
    January 31, 2024

    "relatively long test points on the 8742A chip"

    whatever that means... screenshot?

    Explorer II
    January 31, 2024

    Sorry!

    I meant the tracks to my test points are longer than necessary.

    I wondered whether this would cause H.F. ringing.

    I have cut these tracks so there is minimal length between the LAN I/F and the MCU, but no change.

    I have been running two IDE's one with a NUCLEO F746 and my own board F746-100 and  comparing the same basic software produced by STM32Cubeide.

    Setup of LAN8742A  runs identically on both boards without errors and register values are identical.

    Whatever I do, the green LED stays ON and the yellow led flashes regularly, even when I am stepping through the code from start to where it runs quite happily - while(1) {} etc. but LED's flashing the same and no ethernet.

    If I reset the chip and restart debug there is a short delay then the lights flash again as above.

    It must be a hardware problem, but I cant see what.

     

    I just do not understand this.

    I am going to battle on with this and when I sort it, I will post the whole project here to help some other unfortunates like me !!!!

    Thanks.

     

     

    ST Employee
    February 1, 2024

    Hello @clock.1166 

    LED's flushing like this is the expected behaviour .in fact the green LED in the Ethernet port indicates a successful connection to a network device, while the yellow LED indicates network activity or data transmission. When data is being transmitted, the yellow LED will blink or flash but it can be handled by the LAN8742A without the MCU intervening . so even if the firmware from MCU side is not working you will see those LEDs flashing indicating connection establishment on PHY level .

    BR

    Graduate II
    February 1, 2024

    Okay, so you checked the PHY registers.
    Important question concerning at least the hardware / layout between PHY - transformer - RJ45:

    Did the PHY finish auto-negotiation with the host? And did it "negotiate" 100M / full-duplex?

    If yes, then this part is probably okay, and you have to check the connection between PHY - STM.

    I would start "simple", checking all GPIOs and their alternate functions and speed settings, comparing all settings to the datasheet.
    And then there is still the option of unsoldered pins, or solder bridges.

    Ref clock from PHY = 50 MHz gets to the STM pin?

    Explorer II
    February 1, 2024

    Thanks STea, I've learnt a bit more!

     

    I've erased the MCU on both the Nucleo and the STM32F746-100.

     

    The leds on the Nucleo flash green ON -  yellow flashing irregularly as normal.

    The leds on the F746-100 flash green ON -  yellow flashing around 10Hz regularly.

    Since there  is no software on either board, why are they different?

    It must be something in the hardware?

    Chris

     

    clock.1166AuthorAnswer
    Explorer II
    February 1, 2024

    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

    image.png

    Technical Moderator
    February 1, 2024

    alleluia !  Very glad to see your tenacity and dedication to find it . @clock.1166  Well done !  
    thank you again for all the sharing and experience with Community members .

    Now , you can release your creativity!

    Cheers,

    STOne-32