Skip to main content
Associate II
May 10, 2024
Solved

Stm32h743I using ethernet in Lwip middleware

  • May 10, 2024
  • 8 replies
  • 2774 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.

 

8 replies

Pavel A.
May 10, 2024

Stm32h743IITx board

I compared .ioc files and various code source

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

Lead 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).

Associate II
May 11, 2024

I'm having trouble with my STM32H743IIT6 controller board connected to an Ethernet module (DP83848). The WaveShare source code worked fine, but when I created my own, it didn't work; I can't even ping.

I followed the steps to create the project. I set the network adapter properties, including the IP address (192.168.1.206), subnet mask (255.255.255.0), and default gateway (192.168.1.1)correctly. However, I noticed differences between the STM32CubeMX software version and firmware version compared to the WaveShare source code.

Here, I've attached my own code for Ethernet UDP. Please verify it and provide me with any solutions or suggestions.

Despite setting everything up step by step, I can't establish an Ethernet connection. Could you please help me troubleshoot this situation?

Pavel A.
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.

LCE
Principal II
May 13, 2024

Can you read and write the PHY registers?