‎2020-08-13 09:20 AM
Hello,
I just started my experience with STM32 MCUs with a NUCLEO-F767ZI board. I tried to utilize the Ethernet Port of the Nucleo Board. I created a small test Firmware to get known to LWIP and FREERTOS, since i want to use both in my later Firmware. DHCP and IP Address allocation now finally works and I am able to ping the device. I use the automatically created thread to blink the led. The problem is that the device stops after some time to answer to the pings. Also the LED stops blinking. In debugger something is happening, but it doesnt seem like the thread function is called anymore. Even if I dont ping the device it stops after some time blinking. Only if I disconnect the cable it runs like charm.
I have uploaded my whole code to github, maybe somebody can tell me where my problem is.
Also, is ther a way to debug the FREERTOS with the STM32CubeIDE?
Help is very appreciated.
Thanks
https://github.com/darkmaterial/Nucleo-FZ767ZI_Ethernet_Test
‎2020-08-16 12:53 PM
I had time to do further investigation:
If i do a 400ms ping interval i will crash within 1000pings.
If i do a 200ms ping inverval it will crash within 200 pings.
if i do a 1000byte sized ping it will crash faster
if i do a 5000byte ping it will crash within 1 ping.
if i do a ping every second it works fine...
i now ordered a segger jlink to do further debugging in freertos. Is there a good software to do this with stlink?
‎2020-08-16 02:10 PM
>>Is there a good software to do this with stlink?
Always found Keil's debugger pretty robust.
Would recommend outputting diagnostic/telemetry via a UART or SWV.
Have effective Hard Fault Handler that can output actionable information.
Determine where it "stops" or "crashes" via the debugger.
‎2020-08-19 12:38 PM
Thank you very much :) But currently i am a student and Keil is out of my financial reach :face_with_tears_of_joy:
‎2020-08-19 12:42 PM
I started debugging now with Ozone. My Led task is not visible anymore after the device crashes, and the mcu seems to cycle in this function:
void ethernetif_input(void* argument)
{
struct pbuf *p;
struct netif *netif = (struct netif *) argument;
for( ;; )
{
if (osSemaphoreAcquire(s_xSemaphore, TIME_WAITING_FOR_INPUT) == osOK)
{
do
{
LOCK_TCPIP_CORE();
p = low_level_input( netif );
if (p != NULL)
{
if (netif->input( p, netif) != ERR_OK )
{
pbuf_free(p);
}
}
UNLOCK_TCPIP_CORE();
} while(p!=NULL);
}
}
}
it stays within the for( ;; ) . The only tasks left in the taskview are idle and tmr svc.
‎2020-08-19 01:24 PM
‎2024-08-08 03:47 AM
Hi,
How did u get f767zi to ping at the first place? I cant do that yet.
which reference did u use and what should I pay more attention at?