Skip to main content
Visitor II
July 2, 2018
Question

UDP packet loss

  • July 2, 2018
  • 2 replies
  • 4661 views
Posted on July 02, 2018 at 13:38

Hi, im using stm32f7+ freertos+lwip (raw api). My system handles web server and udp data communication. My frame length is 572 bytes and my FPS is 40 (22880 bytes/sec) at start. When i increase the package number to 8 times (8*572*40 = 183040 bytes/sec) it drops a lots of udp packages.(Especially dropping starts after 6 times = 6*572*40=137kbits) The weird thing is: if i decrease it to 22880 bytes/sec again it cant returns the normal situation it still drops. I have to reset for normal again. Im not expert lwip so i think there is a problem about buffers. I need an advice.

0690X0000060C8qQAE.png

#ethernet #stm32f7 #lwip #udp #freertos
    This topic has been closed for replies.

    2 replies

    Visitor II
    July 2, 2018
    Posted on July 02, 2018 at 14:18

    UDP is not a connection-oriented protocol, and does not guarantee delivery.

    You need a system that can at least keep up with the frame rate (relevant UDP frames + irrelevant frames).

    Change to a Cortex A system.

    Visitor II
    July 2, 2018
    Posted on July 02, 2018 at 14:37

    But someones in market have been made same thing with just Cortex M0. And 137kbits/sec is not big for M7 am i wrong ?

    Visitor II
    July 2, 2018
    Posted on July 02, 2018 at 14:53

    But someones in market have been made same thing with just Cortex M0.

    Really ?

    And 137kbits/sec is not big for M7 am i wrong ?

    As a part of your evaluation, you need to examine the gross data rate of the system.

    Other application functionality, code inefficiencies and network 'noise' will leave just a fraction available for you.

    Visitor II
    July 3, 2018
    Posted on July 03, 2018 at 09:39

    To sum up,  a udp pcb or etc. starts to drops packets. and it never comes back to normal condition. Is there any specs that causes this situation ? 

    Visitor II
    July 3, 2018
    Posted on July 03, 2018 at 10:29

    Your system - hardware + running firmware - is too slow.

    Now it is your task to evaluate if it's caused by inappropriate firmware, or generally inadequate performance of the MCU. But I'm pretty sure it is easy to get the mentioned LPC1766 board into thrashing mode with real-world network traffic.

    As said the first time, I would have picked a Cortex A Linux board.

    Visitor II
    July 3, 2018
    Posted on July 03, 2018 at 16:25

    Thank you for your replies AvaTar. But i think cortex m7 mcu that has ethernet with dedicated dma can handle 1.4Mbps udp communication easily. As i say i have a end device for same purpose which is made with cortex M3 and it handles 2.8 Mbps udp comm. and it doesnt drop any package.