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.

关于6678开发包中GE例程问题的请教



目前想使用该程序,实现DSP向PC机发送UDP报文,已经按照说明做了如下修改:

GE_Test_Data_Path test_data_path = GE_TEST_DSP0_TO_DSP1;

Ethernet_Mode ethernet_mode = ETHERNET_AUTO_NEGOTIAT_MASTER;

Fill_EMAC_header(ucpBuffer, ETHERNET_IPV4_PACKET, Source_MAC_address[j], Dest_MAC_address[j]);

1、在只作上述修改的时候,利用Wireshark软件可以抓到报文,但是源和目的的IP地址均为255.255.255.255,不知道是何处进行设置的;

2、我现在需要发送自己的数据pktMatch[],修改TxDescriptorTempBuffer[]= pktMatch[]时,uiTxGoodFrames=0,应该是没有成功,因此不知道如何将待发送数据包pktMatch[]进行填充;

3、HostPacketDescriptor结构体类型中,很多成员变量没有注释,不知道含义,是否有成员变量可直接用于装订自定义数据包。

问题研究了很久了,都没有得到解决,谢谢了

  • Hi, 您好!

    下面这行代码需要修改:

    Ethernet_Mode ethernet_mode = ETHERNET_AUTO_NEGOTIAT_MASTER;

    修改成:

    Ethernet_Mode ethernet_mode = ETHERNET_AUTO_NEGOTIAT_SLAVE;

    1. 这个报文是PC发出来的

    2. 发送自定义数据时,您需要注释掉GE_2DSP_Test函数中的如下这行代码

    /*fill data pattern*/
       memset(ucpBuffer+EMAC_HEADER_LEN, transferParam->dataPattern, uiPayloadNumBytes);

    并修改为:

    memcpy(ucpBuffer+EMAC_HEADER_LEN, pktMatch, uiPayloadNumBytes);

     

    3. HostPacketDescriptor结构体是按照文档规定格式定义的,您可以在下面的文档中找到结构体定义:

    KeyStone Architecture  Multicore Navigator User Guide (SPRUGR9F)

    3.1 Host Packet Descriptor

    其中Extended packet info block/Protocol-specific data/Other SW data可以传您自定义的数据

    谢谢

  • 谢谢您的回复