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.

[参考译文] Starterware:DSP 6748 UDP 通信问题

Guru**** 2540720 points


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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/569947/starterware-dsp-6748-udp-comunication-issue

工具/软件:Starterware

你好! 我使用 TI DSP 6748芯片 与 采用 UDP LWIP_IGMP 协议的 PC 通信,有两个端口用于接收由 PC 以 5Hz 频率发送的数据 ,两个端口用于以  2Hz 频率向 PC 发送数据 ;

与 starterWare 中的示例(enet_lwip)一样、UDP 初始化代码为:

//--UDP 接收--

 IGMP_JOINGROUP (IP_ADDR_ANY、&Computer_B_ipaddr);

 User2_1pcb = udp_new();
 User2_1pcb->multicing_IP = Computer_B_ipaddr;
 UDP_BIND (user2_1pcb、IP_ADDR_ANY、Board_Port_B_1);
 UDP_CONNECT (user2_1pcb、IP_ADDR_ANY、Computer_B_1_Rx_Port);
 udp_recv (user2_1pcb、UDP2_1Receive, NULL);  

 User2_2pcb = udp_new();
 User2_2pcb->multicing_IP = Computer_B_ipaddr;
 UDP_BIND (user2_2pcb、IP_ADDR_ANY、Board_Port_B_2);
 UDP_CONNECT (user2_2pcb、IP_ADDR_ANY、Computer_B_2_Rx_Port);
 UDP_recv (user2_2pcb、UDP2_2Receive、NULL);   

//--UDP 发送--

LocalMonitor1_PCB = UDP_NEW ();
 LocalMonitor1_PCB/多播_IP = Computer_LocalMonitor_ipaddr;

Antanna_TS_PCB = UDP_NEW ();
 Antanna TS_PCPCB ->组播_IP = Computer_Antenna_TS_ipaddr;

///----------------------------------------------

两个接收端口可以接收180帧的数据、但此后会中断;

在调试中、我发现 UDP 发送过程中出现了问题:

在函数 udp_sendto (),中有 一段代码:

Netif = ip_route ((ip_addr_ismulticast (dst_ip))?(&(pcb ->组播_ip)):(dst_ip));

在 函数 IP_route 中:它 始终在以下代码中运行,因此发送和接收端口不起作用;

 /*通过 NEFifs 迭代*/
 for (netif = netif_list;netif!= NULL;netif = netif->next){
   /*网络掩码匹配? *
   if (netif_is _up (netif)){
     if (ip_addr_netcmp (dest、&(netif->ip_addr)、&(netif->netmask))){
       //返回要转发 IP 数据包的主题*/
       退换货;
     }
   }
 }

///--------------------------------

那么 、如何  解决 这个 问题呢?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    将此主题移至 C67x 论坛。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    我已将此内容转发给软件专家。 他们的反馈应发布在此处。

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

    抱歉、 软件专家的反馈是什么? 我有急事要解决这个问题、谢谢!