cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32h743I using ethernet in Lwip middleware

Raja_Kaaliraj
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions

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.

 

View solution in original post

8 REPLIES 8
Pavel A.
Evangelist III

Stm32h743IITx board

I compared .ioc files and various code source

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

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

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.
Evangelist III

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.

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.

 

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

LCE
Principal

Can you read and write the PHY registers?

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