Skip to main content
Visitor II
July 19, 2020
Solved

STM32H7 Ethernet Not Working

  • July 19, 2020
  • 6 replies
  • 8404 views

Hi There,

I am trying to run the ethernet example from the 1.7.0 version of the STM32H7 firmware at STM32Cube_FW_H7_V1.7.0\Projects\NUCLEO-H743ZI\Applications\LwIP\LwIP_HTTP_Server_Netconn_RTOS.

The only modifications I have performed from the provided example code is I have disabled DHCP to use a static IP address (#define LWIP_DHCP 0).

I am trying to run this on the Nucleo-H743ZI2 development board and I cannot get any response to ping. If I attach the debugger, I can see the STM32 is receiving ARP requests and trying to send out ARP responses. Additionally, if I probe the TXD0/TXD1/TXEN lines on the 8742A PHY chip I can see the lines moving periodically in response to ARP queries. Duration looks good, but I have not parsed out the individual bits.

I have tried this on multiple boards, and additionally on a custom STM32H753x board all with the same behavior.

I have also followed all advice here in this page https://community.st.com/s/article/FAQ-Ethernet-not-working-on-STM32H7x3

I have also tried adding the SCB_CleanInvalidateDCache() in the ethernet low_level_output() function.

I have disabled all firewalls and verified I can ping other devices no problem.

I have double checked all SolderBridges and Jumper Wires are set correctly for ethernet based on the Nucleo data sheet.

My questions are:

  1. Can someone verify the latest 1.7.0 LwIP_HTTP_Server_Netconn_RTOS example project is functioning on the Nucleo-H743ZI2 dev board? 
  2. Does someone have a known working hex file you could provide so that I can verify my hardware is working?

Thank you for any assistance you can provide.

#NUCLEO

#NUCLEO-H743ZI2

#STM32H743ZI

#[STM32 MCUs]​

#STM32H7​

    This topic has been closed for replies.
    Best answer by PMart.1

    @Manu Abraham​ @Community member​ 

    Ok major breakthrough! Switched JP5 from 1.8V mode to 3.3V mode and everything started working perfectly on the Nucleo Dev board! I couldn't find anywhere in the NSTM32H7 Nucleo-144 boards user manual indicating you have to do this!

    It looks like the PHY chip should be able to handle different logic levels using the VDDIO input but maybe that is not the case?

    Thanks again for all the help!

    6 replies

    Visitor II
    July 19, 2020

    Hi,

    I just tried the same sample app on the Nucleo-H743ZI2 board, It works with both DHCP enabled as well as with a static IP Address.

    Works like a charm.

    When you disable DHCP, just make sure that you set IP address to the same class as your PC.

    The default in main.h is set to 192.168.0.10

    Attached hex file with Static IP address is set to 192.168.1.40, Netmask 255.255.255.0, Gateway 192.168.1.1

    PMart.1Author
    Visitor II
    July 19, 2020

    Thanks Manu!

    I tried your hex file and still can't ping the board.

    Anything special I have to do when programming? I just used STLink starting at 0x08000000.

    Visitor II
    July 19, 2020

    You are welcome.

    The only change what I made to the sample code was to disable DHCP in "lwipopts.h"

    /* ---------- DHCP options ---------- */

    #define LWIP_DHCP              0

    and set the IP Address in "main.h"

    /*Static IP ADDRESS*/

    #define IP_ADDR0  192

    #define IP_ADDR1  168

    #define IP_ADDR2  1

    #define IP_ADDR3  40

    It worked without any coaxing or fiddling around.

    Probably, bad ethernet cable ? Could be a board problem also, but lesser probablility, since other boards also have the same issue ?

    The ethernet LED's light up, when the cable is plugged in ?

    PMart.1AuthorAnswer
    Visitor II
    July 20, 2020

    @Manu Abraham​ @Community member​ 

    Ok major breakthrough! Switched JP5 from 1.8V mode to 3.3V mode and everything started working perfectly on the Nucleo Dev board! I couldn't find anywhere in the NSTM32H7 Nucleo-144 boards user manual indicating you have to do this!

    It looks like the PHY chip should be able to handle different logic levels using the VDDIO input but maybe that is not the case?

    Thanks again for all the help!

    Visitor II
    July 20, 2020

    Glad that you were able to fix the problem!

    PMart.1Author
    Visitor II
    July 20, 2020

    Do you know if there are any settings I need to change in software to be able to support 1.8V operations?

    Explorer
    July 21, 2020

    For bug-fixes and improvements refer https://community.st.com/s/question/0D50X0000C6eNNSSQ2/bug-fixes-stm32h7-ethernet.

    If you use it, please post feedback there.

    Graduate II
    July 22, 2020

    > I have also tried adding the SCB_CleanInvalidateDCache() in the ethernet low_level_output() function.

    That is pure nonsense. You can get more information at Alister's and my topic:

    https://community.st.com/s/question/0D50X0000BOtfhnSQB/how-to-make-ethernet-and-lwip-working-on-stm32

    > Can someone verify the latest 1.7.0 LwIP_HTTP_Server_Netconn_RTOS example project is functioning on the Nucleo-H743ZI2 dev board?

    None of ST's Ethernet/lwIP examples are actually working and never (in a foreseeable future) will. For H7 it's totally true, for other series it's "less terrible".

    PMart.1Author
    Visitor II
    July 22, 2020

    Once I switched JP5 to 3.3V the examples worked perfectly.

    Visitor II
    July 22, 2020

    The fault for the problems of ethernet in H7 is the fact that DMA does not access DTCM. This is the biggest disadvantage of the H7 and I hope ST will fix it in the future.

    Explorer
    July 23, 2020

    >DMA does not access DTCM. This is the biggest disadvantage of the H7

    It wouldn't make my top 100 problems list.

    Please elaborate.

    Visitor II
    July 23, 2020

    alister,

    There are few questions on this forum about F7 ethernet, but there is a lot about the H7.

    The difference between H7 and F7 is that in the F7 DMA accesses DTCM and so there is no need to deal with cache coherence issues.

    Explorer
    July 23, 2020

    >so there is no need to deal with cache coherence issues

    I guess you're right. But it's a poor reflection on the state of software development today really.