cancel
Showing results for 
Search instead for 
Did you mean: 

Why does my application stall when calling udpSend?

jmorganj
Associate III

I have been trying to set up an Ethernet application demo on the STM32H757Xi-Eval board that I am helping to evaluate for a customer trying to determine if st micro-controllers are the best chip to utilize in their next gen releases. I have not had much luck demonstrating the Ethernet capability of the STM32H757 chip.

I have been following the article written here that ultimately leads to an article that follows the first one and provides example code as well, found here. The second one even helps to guide how to start the setup up in CubMX and then provides example code for sending UDP messages as well as modifying the FLASH.ld script.

Currently, I am toggling LED4 (Blue) on the board inside my default task. If I remove the udpSend() function, the LED will blink at Hz. Once I put the function back in, there is no response from the LED. What would cause the program to get stuck in that function? It is a pre-written funciton. So, I'd assume I should not need to alter it.

I am running in an Ubuntu 18.04 environment and using the latest H7 firmware library (v.1.10.0). This is a personal computer without any firewalls or running anti-virus. My computer has a set static IP address of 192.168.1.100 and the network manager shows I am connected via ethernet. The directions have the IPv4 DHCP disabled in CubeMX under the LWIP options. The IP address assigned to the board is then 192.168.1.10 with netmask 255.255.255.0. I am unable to ping this address through a terminal. Lastly, on setup, I have an Ethernet cable directly connected from my PC to the evaluation board.

Responses to ping 192.168.1.10 is that the host is unreachable. Any netcat commands in the terminal stalls in the terminal with no response until I kill it with ctrl + c.

1 ACCEPTED SOLUTION

Accepted Solutions
jmorganj
Associate III

The stall was because there was no response from the ethernet phy.

Follow the second linked directions. Set jumper JP5 to the MCO side. Also, use RMII for the ethernet protocol. Under RCC, no need to disable or bypass HSE or LSE. Just use the crystal oscillators on board and enable Master Clock Output 1.

View solution in original post

1 REPLY 1
jmorganj
Associate III

The stall was because there was no response from the ethernet phy.

Follow the second linked directions. Set jumper JP5 to the MCO side. Also, use RMII for the ethernet protocol. Under RCC, no need to disable or bypass HSE or LSE. Just use the crystal oscillators on board and enable Master Clock Output 1.