完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
本帖最后由 一只耳朵怪 于 2018-5-22 15:23 编辑
您好, 首先非常感谢您的回答。我所碰到的问题是MAC address 出错,是不是因为两个核的NDK所使用的EMAC channel 相同造成的呢?另外,我在NDK USER'S GUIDE 和 NDK software programmer's reference guide 两篇文档中好像没发现有设置EMAC channel 的API 呀。我把我的代码和错误信息贴在下面,还想麻烦您看一下,指出问题所在。 使用的核为 CORE_0 和 CORE_1 ,两个核单独启动 即: Ipc.procSync = Ipc.ProcSync_NONE; // in file.cfg 错误信息如下: [C66xx_0] EVM in StaticIP mode at 192.168.0.218 [C66xx_0] QMSS successfully initialized [C66xx_0] CPPI successfully initialized [C66xx_0] PASS successfully initialized [C66xx_0] Ethernet subsystem successfully initialized [C66xx_0] eventId : 48 and vectId : 7 [C66xx_0] Registration of the EMAC Successful, waiting for link up .. [C66xx_0] run in daemon [C66xx_0] receive : [C66xx_1] QMSS successfully initialized [C66xx_1] CPPI successfully initialized [C66xx_1] PASS successfully initialized [C66xx_1] Ethernet subsystem successfully initialized [C66xx_1] eventId : 48 and vectId : 7 [C66xx_1] Timeout waiting for reply from PA to Pa_addMac command [C66xx_1] Add_MACAddress failed [C66xx_1] Error: Unable to register the EMAC CORE_0 网络配置代码: int RunUDP_sever() [ HANDLE hCfg; CI_IPNET NA; IPN IPTmp; int nStatus, nRecv; char *HostName = "UDP_SEVER_0"; char *DomainName = "demo0.net"; /* Not used when using DHCP */ char *DNSServer = "0.0.0.0"; /* Used when set to anything but zero */ nStatus = NC_SystemOpen( NC_PRIORITY_LOW, NC_OPMODE_INTERRUPT ); if(nStatus != NC_OPEN_SUCCESS) [ #ifdef UDP_SEVER_DEBUG printf("NC_SystemOpen Failed (%d)n",nStatus); #endif goto close_n_exit; ] hCfg = CfgNew(); if( !hCfg ) [ #ifdef UDP_SEVER_DEBUG printf("Unable to create configurationn"); #endif goto close_n_exit; ] /* Validate the length of the supplied names */ if( strlen( DomainName ) >= CFG_DOMAIN_MAX || strlen( HostName ) >= CFG_HOSTNAME_MAX ) [ #ifdef UDP_SEVER_DEBUG printf("Domain or Host Name too longn"); #endif goto close_n_exit; ] /* Add our global hostname to hCfg (to be claimed in all connected domains) */ CfgAddEntry( hCfg, CFGTAG_SYSINFO, CFGITEM_DHCP_HOSTNAME, 0, strlen(HostName), (UINT8 *)HostName, 0 ); /* Setup an IP address to this EVM */ bzero( &NA, sizeof(NA) ); NA.IPAddr = inet_addr("192.168.0.218"); NA.IPMask = inet_addr("255.255.255.0"); strcpy( NA.Domain, DomainName ); /* Add the address to interface 1 */ CfgAddEntry( hCfg, CFGTAG_IPNET, 1, 0, sizeof(CI_IPNET), (UINT8 *)&NA, 0 ); /* Manually add the DNS server when specified */ IPTmp = inet_addr(DNSServer); if( IPTmp ) CfgAddEntry( hCfg, CFGTAG_SYSINFO, CFGITEM_DHCP_DOMAINNAMESERVER, 0, sizeof(IPTmp), (UINT8 *)&IPTmp, 0 ); /* Set debug message level */ nStatus = DBG_WARN; CfgAddEntry( hCfg, CFGTAG_OS, CFGITEM_OS_DBGPRINTLEVEL, CFG_ADDMODE_UNIQUE, sizeof(uint), (UINT8 *)&nStatus, 0 ); // UDP Receive limit nRecv = 8192; CfgAddEntry( hCfg, CFGTAG_IP, CFGITEM_IP_SOCKUDPRXLIMIT, CFG_ADDMODE_UNIQUE, sizeof(uint), (UINT8 *)&nRecv, 0 ); do [ nStatus = NC_NetStart( hCfg, NetworkOpen, NetworkClose, NetworkIPAddr ); ] while( nStatus > 0 ); #ifdef UDP_SEVER_DEBUG platform_write ("Shutting things downn"); #endif close_n_exit: CfgFree( hCfg ); NC_SystemClose(); return 0; ] static HANDLE hDaemon=0; static void NetworkOpen() [ hDaemon = DaemonNew( SOCK_DGRAM, 0, 1062, RecvImg, OS_TASKPRIHIGH, OS_TASKSTKNORM, 0, 1 );//7//OS_TASKPRINORM ] CORE_1网络配置代码: int UDP_Sever() [ HANDLE hCfg; CI_IPNET NA; IPN IPTmp; int nStatus, nRecv; char *HostName = "UDP_SEVER"; char *DomainName = "demo.net"; /* Not used when using DHCP */ char *DNSServer = "0.0.0.0"; /* Used when set to anything but zero */ nStatus = NC_SystemOpen( NC_PRIORITY_LOW, NC_OPMODE_INTERRUPT ); if(nStatus != NC_OPEN_SUCCESS) [ #ifdef UDP_SEVER_DEBUG printf("NC_SystemOpen Failed (%d)n",nStatus); #endif goto close_n_exit; ] hCfg = CfgNew(); if( !hCfg ) [ #ifdef UDP_SEVER_DEBUG printf("Unable to create configurationn"); #endif goto close_n_exit; ] /* Validate the length of the supplied names */ if( strlen( DomainName ) >= CFG_DOMAIN_MAX || strlen( HostName ) >= CFG_HOSTNAME_MAX ) [ #ifdef UDP_SEVER_DEBUG printf("Domain or Host Name too longn"); #endif goto close_n_exit; ] /* Add our global hostname to hCfg (to be claimed in all connected domains) */ CfgAddEntry( hCfg, CFGTAG_SYSINFO, CFGITEM_DHCP_HOSTNAME, 0, strlen(HostName), (UINT8 *)HostName, 0 ); /* Setup an IP address to this EVM */ bzero( &NA, sizeof(NA) ); NA.IPAddr = inet_addr("192.168.0.217"); NA.IPMask = inet_addr("255.255.255.0"); strcpy( NA.Domain, DomainName ); /* Add the address to interface 1 */ CfgAddEntry( hCfg, CFGTAG_IPNET, 1, 0, sizeof(CI_IPNET), (UINT8 *)&NA, 0 ); /* Manually add the DNS server when specified */ IPTmp = inet_addr(DNSServer); if( IPTmp ) CfgAddEntry( hCfg, CFGTAG_SYSINFO, CFGITEM_DHCP_DOMAINNAMESERVER, 0, sizeof(IPTmp), (UINT8 *)&IPTmp, 0 ); /* Set debug message level */ nStatus = DBG_WARN; CfgAddEntry( hCfg, CFGTAG_OS, CFGITEM_OS_DBGPRINTLEVEL, CFG_ADDMODE_UNIQUE, sizeof(uint), (UINT8 *)&nStatus, 0 ); // UDP Receive limit nRecv = 8192; CfgAddEntry( hCfg, CFGTAG_IP, CFGITEM_IP_SOCKUDPRXLIMIT, CFG_ADDMODE_UNIQUE, sizeof(uint), (UINT8 *)&nRecv, 0 ); do [ nStatus = NC_NetStart( hCfg, NetworkOpen, NetworkClose, NetworkIPAddr ); ] while( nStatus > 0 ); #ifdef UDP_SEVER_DEBUG platform_write ("Shutting things downn"); #endif close_n_exit: CfgFree( hCfg ); NC_SystemClose(); return 0; ] static HANDLE hDaemon=0; static void NetworkOpen() [ // Create our local server hHello = DaemonNew( SOCK_DGRAM, 0, 7, dtask_udp_hello, OS_TASKPRINORM, OS_TASKSTKNORM, 0, 1 ); ] |
|
相关推荐
3个回答
|
|
|
|
|
|
非常感谢Thomas Yang 的解答。 |
|
|
|
将EVM板上的switch开关调到“ No boot” 模式,就可以了,我在6670EVM上面试过了,具体查看下面两个URL :http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/132177.aspx
http://processors.wiki.ti.com/index.php/TMDXEVM6670L_EVM_Hardware_Setup |
|
|
|
只有小组成员才能发言,加入小组>>
326 浏览 1 评论
524 浏览 2 评论
NA555DR VCC最低电压需要在5V供电,为什么用3.3V供电搭了个单稳态触发器也使用正常?
768 浏览 3 评论
MSP430F249TPMR出现高温存储后失效了的情况,怎么解决?
647 浏览 1 评论
对于多级放大电路板,在PCB布局中,电源摆放的位置应该注意什么?
1122 浏览 1 评论
AT32F407在USART2 DMA发送数据时,接包接到了要发送的数据,程序还是处于等待传输完成的标识判断中,为什么?
38浏览 29评论
73浏览 23评论
请问下tpa3220实际测试引脚功能和官方资料不符,哪位大佬可以帮忙解答下
242浏览 20评论
请教下关于TAS5825PEVM评估模块原理图中不太明白的地方,寻求答疑
193浏览 14评论
两个TMP117传感器一个可以正常读取温度值,一个读取的值一直是0,为什么?
53浏览 13评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-21 02:40 , Processed in 0.718367 second(s), Total 51, Slave 45 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号