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.

[参考译文] TMS320F28386S:LwIP 同时发送多条 UDP 消息会导致断言。

Guru**** 2535750 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1173183/tms320f28386s-lwip-sending-multiple-udp-messages-together-cause-an-assert

器件型号:TMS320F28386S

您好!  

我正在使用 fiftend 函数发送 UDP 消息:

void SendData_udp (unsigned char * buf、unsigned int len)

memcpy (buf_tx、buf、len);

pbuf_sl_TX = pbuf_alloc (PBUF_transport、len、PBUF_RAM);

if (pbuf_sl_TX!= NULL){
  pbuf_sl_tx->payload =(void*) buf_tx;
  pbuf_sl_tx->tut_len = len;
  pbuf_sl_tx->len = len;

  udp_send (g_upcb_Decoder、pbuf_sl_TX);

  pbuf_free (pbuf_sl_TX);
  }

同时调用此函数3次或更多次时、我会在文件 mem.c 中得到一个断言

我想得到一些解释。

我不应该发送 连续的消息?

如何避免这种情况?