Skip to main content
Visitor II
May 10, 2024
Solved

Stm32h743I using ethernet in Lwip middleware

  • May 10, 2024
  • 3 replies
  • 2688 views

Hii I'm currently working stm32h743IITx 176  pins stm32cube mx v 6.2.0 . i used ethernet in lwip middleware are used my currently using firmware version 1.9.1 but couldn't connect udp cilent in ethernet   . 

No ping, no nothing. Currently I test with the Stm32h743IITx board.

I compared .ioc files and various code source, but couldn't find any

Any help welcome,

thanks in advance

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

    Hi,

    I look in Your code and I see that Your code initialize driver LAN8742. You write that You have controller board connected by driver DP83848 to the Ethernet. First verify which You have driver.

     

    3 replies

    Super User
    May 10, 2024

    Stm32h743IITx board

    I compared .ioc files and various code source

    Is it custom board with custom PHY? Compared with what? 

    Visitor II
    May 10, 2024

    First: is your network configuration ok?

    • does your MCU board has an IP address (used in LwIP)?
      (as STATIC or via DHCP)
    • do you have a route from host PC to MCU?
      (both on the same network?)
      Or do you use a direct cable (so that use STATIC IP address will work, on both sides)?

    "ping" working, I think, needs to be enabled in the LwIP config, as ICMP. If not: ping is not working (but maybe the other network stuff).

    I am not sure if a CubeMX .ioc file enough: your FW (source code) has to configure properly LwIP (not done automatically via CubeMX).

    Debug your code:

    • is there a DHCP client running?
      Does it get an IP address?
    • If direct cable or no DHCP: does your MUC "fall back" or setup a STATIC IP address?
    • is ICMP enabled?
    • are host PC and MCU on the same network?
      (or do you set a correct gateway to reach the MCU)
    • Is there any network traffic coming in on MCU?
      (e.g., for DHCP)
    • are your DMA descriptors for ETH DMA properly set?
      (via linker script to assign to a non-cached region)
      (is the MPU properly configured for non-caching regions for ETH DMA descriptors?)

    It works fine for me, but many "specific" stuff (like linker script, MPU config, LwIP config, ...) to do. I cannot imagine that CubeMX generates all this: you had to modify, add code (esp. MPU config).

    Super User
    May 11, 2024

    First, please ensure that your program can talk to the PHY (what you call "Ethernet module") and it sees the cable connection and speed/duplex detected correctly. When this checked, set breakpoint on the packet received point in the code and send any broadcast from other machine. You should get the breakpoint hit. Then you can proceed to the IP addresses, pings and so on.

    SKacp.1Answer
    Visitor II
    May 11, 2024

    Hi,

    I look in Your code and I see that Your code initialize driver LAN8742. You write that You have controller board connected by driver DP83848 to the Ethernet. First verify which You have driver.

     

    Visitor II
    May 13, 2024

    "I have checked my DP83848 driver and its connections thoroughly, but I am still unable to ping."

    Visitor II
    May 13, 2024

    Hi,

    Please see my testing application for custom board STM32H743BIT with DP83848. Maybe it help You. Aplication was created in STM32CUBEIDE version 1.7.0

    Graduate II
    May 13, 2024

    Can you read and write the PHY registers?