This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MCU-PLUS-SDK-AM263X: Sending UDP messages with size greater than or equal 1500 bytes on AM263x-c at once

Part Number: MCU-PLUS-SDK-AM263X
Other Parts Discussed in Thread: TMDSCNCD263

I have a TMDSCNCD263 Evaluation Board with AM263x-cc MCU.
I want to use the CPSW ethernet port to send udp frames with an external client.

I used an example made by TI (enet_cpsw_udp_igmp_am263x-cc_r5fss0-0_freertos_ti-arm-clang) to send udp frames.

My problem is when I try to send a message with size greater or equal to 1500B, I got an exception that it couldn't send this size.

So, could you help out to validate that I could send a message with size up to 10KB at once.

  • Hi,

    We will try it on our end. I will get back by next week.

    BR

    Nilabh A.

  • Hi Ibrahim,

    Since max MTU size supported by Lwip is 1500MTU. So max data size that can be transmitted at once over plain Ethernet (1500 bytes MTU - 20 bytes IP header - 8 bytes UDP header = 1472 bytes.

    Now coming to your case sending 10KB data chunk you can send your data into multiple datagrams. Since datagrams may arrive out of sending order or even get lost, this requires some kind of protocol or header. For example you can define four bytes at the beginning of  the buffer offset, or a datagram sequence number. Now I would not recommend fragmentation because if you loose any data gram you will not be able to construct your message, as UDP is connection less. So I would recommend TCP. But still if you want to use UDP,  use the maximum UDP payload size i.e 1432B.

    Let me know if you need any other info.

    BR

    Nilabh A.