Skip to main content
Visitor II
August 13, 2020
Question

Nucleo-F767ZI Ethernet LWIP Ping causes crash

  • August 13, 2020
  • 4 replies
  • 2176 views

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

    This topic has been closed for replies.

    4 replies

    Visitor II
    August 16, 2020

    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?

    Graduate II
    August 16, 2020

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

    Visitor II
    August 19, 2020

    Thank you very much :) But currently i am a student and Keil is out of my financial reach :face_with_tears_of_joy:

    Visitor II
    August 19, 2020

    0693W000003Pob4QAC.png0693W000003PoaGQAS.pngI 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.

    Explorer
    August 8, 2024

    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?