7292 views|7 replies

2865

Posts

4

Resources
The OP
 

【ST NUCLEO-H743ZI Review】(2) First experience with Ethernet testing [Copy link]

This post was last edited by bigbat on 2019-2-22 11:52 After lighting up the LED in the previous article, start testing Ethernet. The board is provided by ST, Board information This is the part I am more concerned about. At first, I used STM32CubeMX to test the network part, but it didn't work! I will describe this process below. First, after starting STM32CubeMX, the Borad Selector is selected to create the project, and the "ST NUCLEO-H743ZI" board project is specially selected. The first problem after creating the project is that the lwIP option is "gray"! Checking the problem description card, it says: It is because "CORTEX_M7 CPU DCache" is not enabled, so enable it. After opening it, lwIP can be used as expected. Then use lwIP to set the IP address, find General Settings to turn off IPv4-DHCP, set my IP to 192.168.1.5, mask 255.255.255.0, gateway 192.168.1.1 to confirm it is correct, click Generate, An error message appears saying: PHY settings are incomplete. I opened the ETH project, but was shocked. There was no PHY option at all. I clearly remembered that the PHY options and initialization were in the ETH tab! Why is it gone? I carefully checked the software prompts and found that it said that the PHY settings are completed by the lwIP part. Oh? I seemed to understand, so I went to the lwIP tab to find it. Sure enough, there was this option in Platform Settings. I selected LAN8742, then set up other projects, generated code, and succeeded. I quickly compiled and generated it while it was hot, and downloaded it to the development board. Plug in the network cable and "test". Let's ping it first! It's tragic: "Unable to access the target host". The host was not found using arp -a. I continued to look for the cause. But there was very little information. A useful post said that it was necessary to "turn on the Ethernet global interrupt". Then I found the ETH setting card and turned on the setting. I generated the code again and downloaded it to the board, but the problem remained. It still couldn't ping. In other words, there was no such IP. I continued to search online and found that there was a BUG in STM32Cube_FW_H7_V1.3.0! It said that SCB_CleanInvalidateDCache() should be added before the function HAL_ETH_Transmit(). I looked at the code and found this sentence. I was quite puzzled. Later, I thought of using the DHCP function, so I turned on DHCP in the lwIP tab. After the program was executed, I turned on the router to check the DHCP list, but did not find the host "00:80:E1:00:00:00". I checked online and found that this MAC is a legal MAC of ST. I was really depressed, and wondered if the network card was broken. So I checked the lights on the network card and found that the "connection" light was on (green), and after pressing reset, the "data light" flashed (yellow). There should be no problem with the network card. So I started debugging and checked that the PHY initialization could also be executed. I had no clue at all. I went to look for the routines of the development board, but I couldn't find it after searching for a long time. The foreign master said it was in the package en.stm32cubeh7.zip. I opened it and found two projects, NUCLEO-H743ZI and STM32H743I-EVAL. I found \STM32Cube_FW_H7_V1.3.0\Projects\STM32H743ZI-Nucleo\Applications\LwIP\LwIP_HTTP_Server_Netconn_RTOS, and the project. I opened it to compile, download, and run it. I found the IP from the router and opened the webpage. I found no problem. Although the ping is different, the webpage is good, and there are pictures in it! It is not important whether it can be pinged, as long as the network is connected. Since there is no problem with the network card, why not? Keep trying to find out what the problem is. This content is originally created by bigbat, a netizen on the EEWORLD forum. If you need to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source




This post is from stm32/stm8

Latest reply

Is this problem solved? If not, please contact me, QQ: 264935346  Details Published on 2019-5-10 22:53
 

1310

Posts

3

Resources
2
 
Is ICMP protocol enabled?
This post is from stm32/stm8

Comments

Of course it is enabled, it is definitely not a configuration problem, now it is impossible to get an IP address at all. The supporting routines also cannot ping, but can get an IP  Details Published on 2019-2-22 15:34
 
 

2865

Posts

4

Resources
3
 
54chenjq posted on 2019-2-22 15:07 Is ICMP protocol enabled?
Of course it is enabled. It is definitely not a configuration problem. Now I can't get an IP address at all. The supporting routines can't ping either, but I can get an IP address
This post is from stm32/stm8
 
 

2865

Posts

4

Resources
4
 
I've been depressed all day today. I compared the ethernetif.c files of the two projects and found that there are many differences between the two files. I have no clue for the time being and don't know where the problem lies.
This post is from stm32/stm8
 
 
 

2865

Posts

4

Resources
5
 
After two days, this network project generated by STM32CubeMX still doesn't work. Through debugging, I found that
  1. /* Registers the default network interface */ netif_set_default(&gnetif); if (netif_is_link_up(&gnetif)) { /* When the netif is fully configured this function must be called */ netif_set_up(&gnetif); } else { /* When the netif link is down this function must be called */ netif_set_down(&gnetif); }
复制代码
The program reaches line 12, netif_set_down(&gnetif);, which means that the network is not up at all. I hope some experts can give me some advice.
This post is from stm32/stm8
 
 
 

1

Posts

0

Resources
6
 
Bro, shouldn't you check where netif_set_default(&gnetif) fails? Run a printf to track where gnetif returns 0.
This post is from stm32/stm8
 
 
 

3

Posts

0

Resources
7
 
After downloading the official routine, wait for 1 minute, and the red and blue lights on the board will light up and you can ping it.
This post is from stm32/stm8
 
 
 

1

Posts

0

Resources
8
 
Is this problem solved? If not, please contact me, QQ: 264935346
This post is from stm32/stm8
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

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