1827 views|2 replies

409

Posts

7

Resources
The OP
 

[Distributed temperature and humidity acquisition system] + STM32H745I-LWIP program [Copy link]

 This post was last edited by lansebuluo on 2022-7-13 12:29

I searched online for the LWIP routines of STM32H745I-DISCO, but I couldn't find any. I heard that LWIP can be generated using CubeMx. Although I have some resistance to this kind of automatic code generation tool, there is no better way to find network routines, so I might as well give it a try. After installing CubeMx, I created a new project with great expectations. I didn't expect that I could directly select STM32H745I-DISCO to generate the driver, which saved a lot of time configuring pins, peripherals and other functions.

After searching the tutorial on how to generate LWIP from CubeMx on the Internet, configuring ETH, LWIP, MPU, LAN8742, etc., following the steps to generate the code, and finally downloading it to the development board, the program can run, but for some reason it cannot be pinged. By capturing the messages on the network, it was found that after the program was initialized, only one ARP request frame was sent. The messages on the network could not be received.

I tried to read the driver register of LAN8742, and found no problem in identification and setting. The development board uses LAN8740, and the registers and configurations are basically the same, so the problem should not be here. By using the LOOPBACK mode inside the LAN8740 chip, I found that I still could not receive data.

At this point, I began to suspect that the generated code driver configuration might not be correct. I couldn't doubt CubeMx. No matter how smart the software is, it still needs the correct configuration items. This has already consumed several nights. I can't continue to adjust it like this. I have to speed up the process.

Change your thinking and find the LWIP routine closest to the development board STM32H745I-DISCO in STM32Cube_FW_H7_V1.10.0 for porting. There are LWIP examples in STM32H743I-EVAL.

Copy the LWIP routine folder under the STM32H743I-EVAL development board to a similar location in the STM32H745I-DISCO directory, select a project, and what you need here may be LwIP_TCP_Echo_Server. Open the project with IAR, and then change the device, the stm32h745xx.h file included in the project, the power supply mode PWR_DIRECT_SMPS_SUPPLY, etc., change the RMII interface to MII, and replace the ETH pin configuration in the CubeMx generated project with the routine.

After preparation, the project was compiled and downloaded, pinged, the PC established a TCP client, the connection was successful, data was sent, and the same data was received, and LWIP ran successfully.

This is basically a debugging process for LWIP, record it, and more importantly upload the code.

LwIP.rar (5.26 MB, downloads: 7)

This post is from DigiKey Technology Zone

Latest reply

Sometimes the random searches on the Internet are fragmented and unsystematic, which can easily lead to pitfalls. Thank you for recording and sharing the debugging process of LWIP under the STM32H743I-EVAL development board with everyone   Details Published on 2022-7-12 07:13
 
 

6593

Posts

0

Resources
2
 

Sometimes the random searches on the Internet are fragmented and unsystematic, which can easily lead to pitfalls.

Thank you for recording and sharing the debugging process of LWIP under the STM32H743I-EVAL development board with everyone

This post is from DigiKey Technology Zone

Comments

Going through more pits is also an improvement for yourself  Details Published on 2022-7-12 09:20
 
 
 

409

Posts

7

Resources
3
 
Jacktang posted on 2022-7-12 07:13 Sometimes the random searches on the Internet are fragmented and unsystematic, which can easily lead to pitfalls. Thank you for the LWIP under the STM32H743I-EVAL development board, the debugging process, and the record...

Going through more pits is also an improvement for yourself

This post is from DigiKey Technology Zone
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list