TI中文支持网
TI专业的中文技术问题搜集分享网站

求助AM335x starterware DHCP获取IP失败的问题

我有两个开发板 一个是TI的starter kit 另一个是飞凌的OK335xD,问题如下:

将开发板与电脑连接,并在电脑运行DHCP服务器,环境为WINXP下的CCS5.5,OK335xD采用JLINK仿真器,SK采用板载的仿真器

1.我在运行starterware 中的enetLwip的时候:

   a.SK通过DHCP服务器可以正常获取IP

   b.OK335xD 无法获取IP,失败

2.通过网络分析软件发现:

   a.SK发送了搜索DHCP服务器数据包,DHCP服务提供了IP给开发板,SK又发送了IP的申请,DHCP服务器返回了IP确认的数据包。顺利成功获取IP。

   b.OK335xD发送了搜索DHCP服务器数据包,DHCP服务提供了IP给开发板,但是貌似开发板并未收到DHCP服务器分配给开发板的数据包,经过反复测试以及对源码的解读,发现开发板处理接收到的数据包是在接收中断中进行的,CPSWCore0TxIsr

3.在接收中断函数打上断点:

   a.SK可以顺利进入中断函数,并且处理数据包

   b.OK335xD可以进入发送中断函数,但是无法进入接收中断函数。发现问题出在这里!

4.排除硬件问题:

  a.SK插入SD卡,运行安卓,获取IP成功。

   b.OK335xD运行WINCE系统,可以获取IP,以及连接路由器可以上网。可以确认硬件没有问题,问题出在软件上。

5.硬件没有问题,且无法进入接收中断,下一步只能打印寄存器了:

      (1)但是通过打印出来的寄存器并未发现有什么异常,首先附上MDIO寄存器

   a.SK MDIO寄存器:

0x0= 0x1140
0x1= 0x796d
0x2= 0x4d
0x3= 0xd074
0x4= 0x1de1
0x5= 0xcde1
0x6= 0xf
0x7= 0x2801
0x8= 0x0
0x9= 0x200
0xa= 0x6c00
0xb= 0x0
0xc= 0x0
0xd= 0x0
0xe= 0x0
0xf= 0xa000
0x10= 0x862
0x11= 0xbc1c
0x12= 0x0
0x13= 0xfe40
0x14= 0x82c
0x15= 0x0
0x16= 0x4e8
0x17= 0x0
0x18= 0x3200
0x19= 0x3000
0x1a= 0x0
0x1b= 0x63e
0x1c= 0x0
0x1d= 0x0
0x1e= 0x82ee
0x1f= 0x8100

   b.OK335xD MDIO寄存器:

0x0= 0x1140
0x1= 0x796d
0x2= 0x4d
0x3= 0xd074
0x4= 0x1de1
0x5= 0xcde1
0x6= 0xf
0x7= 0x2801
0x8= 0x0
0x9= 0x200
0xa= 0x6c00
0xb= 0x0
0xc= 0x0
0xd= 0x0
0xe= 0x0
0xf= 0xa000
0x10= 0x862
0x11= 0xbc1c
0x12= 0x0
0x13= 0xfe40
0x14= 0x82c
0x15= 0x0
0x16= 0x4e8
0x17= 0x0
0x18= 0x3200
0x19= 0x3000
0x1a= 0x0
0x1b= 0x63e
0x1c= 0x0
0x1d= 0x0
0x1e= 0x82ee
0x1f= 0x8100

   (2)AM335x寄存器如下:

   a.SK寄存器:

CPSW_SS Registers:
0x4a100000= 0x19010c
0x4a100004= 0x0
0x4a100008= 0x0
0x4a10000c= 0x7
0x4a100010= 0x0
0x4a100014= 0x0
0x4a100018= 0x3003
0x4a10001c= 0xb
0x4a100020= 0x20
0x4a100024= 0x1
0x4a100028= 0x81008100
0x4a10002c= 0x0
0x4a100030= 0x80e1
CPSW_PORT Registers:
0x4a100100= 0x0
0x4a100108= 0x104
0x4a10010c= 0x41
0x4a100110= 0x140c0
0x4a100114= 0x0
0x4a100118= 0x33221001
0x4a10011c= 0x76543210
0x4a100120= 0x0
0x4a100130= 0x0
0x4a100134= 0x0
0x4a100138= 0x0
0x4a10013c= 0x0
0x4a100140= 0x0
0x4a100144= 0x0
0x4a100148= 0x0
0x4a10014c= 0x0
0x4a100200= 0x0
0x4a100208= 0x113
0x4a10020c= 0x41
0x4a100210= 0x80040c0
0x4a100214= 0x1
0x4a100218= 0x33221001
0x4a10021c= 0x1e0000
0x4a100220= 0xb54e
0x4a100224= 0x89a194d4
0x4a100228= 0x0
0x4a100230= 0x0
0x4a100234= 0x0
0x4a100238= 0x0
0x4a10023c= 0x0
0x4a100240= 0x0
0x4a100244= 0x0
0x4a100248= 0x0
0x4a10024c= 0x0
0x4a100300= 0x0
0x4a100308= 0x113
0x4a10030c= 0x41
0x4a100310= 0x80040c0
0x4a100314= 0x0
0x4a100318= 0x33221001
0x4a10031c= 0x1e0000
0x4a100320= 0x0
0x4a100324= 0x0
0x4a100328= 0x0
0x4a100330= 0x0
0x4a100334= 0x0
0x4a100338= 0x0
0x4a10033c= 0x0
0x4a100340= 0x0
0x4a100344= 0x0
0x4a100348= 0x0
0x4a10034c= 0x0
CPSW_CPDMA Registers:
0x4a100800= 0x180108
0x4a100804= 0x1
0x4a100808= 0x0
0x4a100810= 0x180108
0x4a100814= 0x1
0x4a100818= 0x0
0x4a10081c= 0x0
0x4a100820= 0x0
0x4a100824= 0x80000000
0x4a100828= 0x0
0x4a10082c= 0x0
0x4a100830= 0x0
0x4a100834= 0x0
0x4a100838= 0x0
0x4a10083c= 0x0
0x4a100840= 0x0
0x4a100844= 0x0
0x4a100848= 0x0
0x4a10084c= 0x0
0x4a100880= 0x0
0x4a100884= 0x0
0x4a100888= 0x1
0x4a10088c= 0x1
0x4a100890= 0x0
0x4a100894= 0x1
0x4a1008a0= 0x0
0x4a1008a4= 0x0
0x4a1008a8= 0x1
0x4a1008ac= 0x1
0x4a1008b0= 0x0
0x4a1008b4= 0x0
0x4a1008b8= 0x0
0x4a1008bc= 0x0
0x4a1008c0= 0x0
0x4a1008c4= 0x0
0x4a1008c8= 0x0
0x4a1008cc= 0x0
0x4a1008d0= 0x0
0x4a1008d4= 0x0
0x4a1008d8= 0x0
0x4a1008dc= 0x0
0x4a1008e0= 0x0
0x4a1008e4= 0x0
0x4a1008e8= 0x0
0x4a1008ec= 0x0
0x4a1008f0= 0x0
0x4a1008f4= 0x0
0x4a1008f8= 0x0
0x4a1008fc= 0x0
CPSW_STATS Registers:
0x4a100900= 0x0
0x4a100904= 0x0
0x4a100908= 0x0
0x4a10090c= 0x0
0x4a100910= 0x0
0x4a100914= 0x0
0x4a100918= 0x0
0x4a10091c= 0x0
0x4a100920= 0x0
0x4a100924= 0x0
0x4a100930= 0x0
0x4a100934= 0x0
0x4a100938= 0x0
0x4a10093c= 0x0
0x4a100940= 0x0
0x4a100944= 0x0
0x4a100948= 0x0
0x4a10094c= 0x0
0x4a100950= 0x0
0x4a100954= 0x0
0x4a100958= 0x0
0x4a10095c= 0x0
0x4a100960= 0x0
0x4a100964= 0x0
0x4a100968= 0x0
0x4a10096c= 0x0
0x4a100970= 0x0
0x4a100974= 0x0
0x4a100978= 0x0
0x4a10097c= 0x0
0x4a100980= 0x0
0x4a100984= 0x0
0x4a100988= 0x0
0x4a10098c= 0x0
CPDMA_STATERAM Registers:
0x4a100a00= 0x0
0x4a100a04= 0x0
0x4a100a08= 0x0
0x4a100a0c= 0x0
0x4a100a10= 0x0
0x4a100a14= 0x0
0x4a100a18= 0x0
0x4a100a1c= 0x0
0x4a100a20= 0x4a103000
0x4a100a24= 0x0
0x4a100a28= 0x0
0x4a100a2c= 0x0
0x4a100a30= 0x0
0x4a100a34= 0x0
0x4a100a38= 0x0
0x4a100a3c= 0x0
0x4a100a40= 0x0
0x4a100a44= 0x0
0x4a100a48= 0x0
0x4a100a4c= 0x0
0x4a100a50= 0x0
0x4a100a54= 0x0
0x4a100a58= 0x0
0x4a100a5c= 0x0
0x4a100a60= 0x0
0x4a100a64= 0x0
0x4a100a68= 0x0
0x4a100a6c= 0x0
0x4a100a70= 0x0
0x4a100a74= 0x0
0x4a100a78= 0x0
0x4a100a7c= 0x0
CPSW_CPTS Registers:
0x4a100c00= 0x4e8a0101
0x4a100c04= 0x0
0x4a100c0c= 0x0
0x4a100c10= 0x0
0x4a100c14= 0x0
0x4a100c20= 0x0
0x4a100c24= 0x0
0x4a100c28= 0x0
0x4a100c30= 0x0
0x4a100c34= 0x0
0x4a100c38= 0x0
CPSW_ALE Registers:
0x4a100d00= 0x290104
0x4a100d08= 0x80000004
0x4a100d10= 0x0
0x4a100d18= 0x0
0x4a100d20= 0x1
0x4a100d34= 0x0
0x4a100d38= 0x3001d494
0x4a100d3c= 0xa1894eb5
0x4a100d40= 0x3
0x4a100d44= 0x3
0x4a100d48= 0x3
0x4a100d4c= 0x0
0x4a100d50= 0x0
0x4a100d54= 0x0
CPSW_SL1 Registers:
0x4a100d80= 0x170112
0x4a100d84= 0x180a0
0x4a100d88= 0x80000010
0x4a100d8c= 0x0
0x4a100d90= 0x5ee
0x4a100d94= 0x1e90000
0x4a100d98= 0x0
0x4a100d9c= 0x0
0x4a100da0= 0x0
0x4a100da4= 0x76543210
0x4a100da8= 0xc
CPSW_SL2 Registers:
0x4a100dc0= 0x170112
0x4a100dc4= 0x0
0x4a100dc8= 0x80000000
0x4a100dcc= 0x0
0x4a100dd0= 0x5ee
0x4a100dd4= 0x22a0000
0x4a100dd8= 0x0
0x4a100ddc= 0x0
0x4a100de0= 0x0
0x4a100de4= 0x76543210
0x4a100de8= 0xc
CPSW_WR Registers:
0x4a101200= 0x4edb0100
0x4a101204= 0x0
0x4a101208= 0xa
0x4a10120c= 0x0
0x4a101210= 0x0
0x4a101214= 0x1
0x4a101218= 0x1
0x4a10121c= 0x0
0x4a101220= 0x0
0x4a101224= 0x0
0x4a101228= 0x0
0x4a10122c= 0x0
0x4a101230= 0x0
0x4a101234= 0x0
0x4a101238= 0x0
0x4a10123c= 0x0
0x4a101240= 0x0
0x4a101244= 0x0
0x4a101248= 0x0
0x4a10124c= 0x0
0x4a101250= 0x0
0x4a101254= 0x0
0x4a101258= 0x0
0x4a10125c= 0x0
0x4a101260= 0x0
0x4a101264= 0x0
0x4a101268= 0x0
0x4a10126c= 0x0
0x4a101270= 0x0
0x4a101274= 0x0
0x4a101278= 0x0
0x4a10127c= 0x0
0x4a101280= 0x0
0x4a101284= 0x0
0x4a101288= 0x5
Interrupt Controller Registers:
0x48200000= 0x50
0x48200010= 0x0
0x48200014= 0x1
0x48200040= 0x5f
0x48200044= 0xffffff80
0x48200048= 0x0
0x4820004c= 0x0
0x48200050= 0x0
0x48200060= 0x0
0x48200064= 0xffffffc0
0x48200068= 0xff
0x48200080= 0x306
0x48200084= 0xffffffff
0x48200088= 0x0
0x4820008c= 0x0
0x48200090= 0x0
0x48200094= 0x0
0x48200098= 0x0
0x4820009c= 0x0
0x482000a0= 0x0
0x482000a4= 0xfffff9ff
0x482000a8= 0x0
0x482000ac= 0x0
0x482000b0= 0x0
0x482000b4= 0x0
0x482000b8= 0x0
0x482000bc= 0x0
0x482000c0= 0x0
0x482000c4= 0x7fffffff
0x482000c8= 0x0
0x482000cc= 0x0
0x482000d0= 0x0
0x482000d4= 0x0
0x482000d8= 0x0
0x482000dc= 0x0
0x482000e0= 0x0
0x482000e4= 0xffffffff
0x482000e8= 0x0
0x482000ec= 0x0
0x482000f0= 0x0
0x482000f4= 0x0
0x482000f8= 0x0
0x482000fc= 0x0

   b.OK335xD寄存器如下:

CPSW_SS Registers:
0x4a100000= 0x19010c
0x4a100004= 0x0
0x4a100008= 0x0
0x4a10000c= 0x7
0x4a100010= 0x0
0x4a100014= 0x0
0x4a100018= 0x3003
0x4a10001c= 0xb
0x4a100020= 0x20
0x4a100024= 0x1
0x4a100028= 0x81008100
0x4a10002c= 0x0
0x4a100030= 0x80e1
CPSW_PORT Registers:
0x4a100100= 0x0
0x4a100108= 0x104
0x4a10010c= 0x41
0x4a100110= 0x140c0
0x4a100114= 0x0
0x4a100118= 0x33221001
0x4a10011c= 0x76543210
0x4a100120= 0x0
0x4a100130= 0x0
0x4a100134= 0x0
0x4a100138= 0x0
0x4a10013c= 0x0
0x4a100140= 0x0
0x4a100144= 0x0
0x4a100148= 0x0
0x4a10014c= 0x0
0x4a100200= 0x0
0x4a100208= 0x113
0x4a10020c= 0x41
0x4a100210= 0x80040c0
0x4a100214= 0x1
0x4a100218= 0x33221001
0x4a10021c= 0x1e0000
0x4a100220= 0x710a
0x4a100224= 0x5c9d667c
0x4a100228= 0x0
0x4a100230= 0x0
0x4a100234= 0x0
0x4a100238= 0x0
0x4a10023c= 0x0
0x4a100240= 0x0
0x4a100244= 0x0
0x4a100248= 0x0
0x4a10024c= 0x0
0x4a100300= 0x0
0x4a100308= 0x113
0x4a10030c= 0x41
0x4a100310= 0x80040c0
0x4a100314= 0x0
0x4a100318= 0x33221001
0x4a10031c= 0x1e0000
0x4a100320= 0x0
0x4a100324= 0x0
0x4a100328= 0x0
0x4a100330= 0x0
0x4a100334= 0x0
0x4a100338= 0x0
0x4a10033c= 0x0
0x4a100340= 0x0
0x4a100344= 0x0
0x4a100348= 0x0
0x4a10034c= 0x0
CPSW_CPDMA Registers:
0x4a100800= 0x180108
0x4a100804= 0x1
0x4a100808= 0x0
0x4a100810= 0x180108
0x4a100814= 0x1
0x4a100818= 0x0
0x4a10081c= 0x0
0x4a100820= 0x0
0x4a100824= 0x80000000
0x4a100828= 0x0
0x4a10082c= 0x0
0x4a100830= 0x0
0x4a100834= 0x0
0x4a100838= 0x0
0x4a10083c= 0x0
0x4a100840= 0x0
0x4a100844= 0x0
0x4a100848= 0x0
0x4a10084c= 0x0
0x4a100880= 0x0
0x4a100884= 0x0
0x4a100888= 0x1
0x4a10088c= 0x1
0x4a100890= 0x0
0x4a100894= 0x1
0x4a1008a0= 0x0
0x4a1008a4= 0x0
0x4a1008a8= 0x1
0x4a1008ac= 0x1
0x4a1008b0= 0x0
0x4a1008b4= 0x0
0x4a1008b8= 0x0
0x4a1008bc= 0x0
0x4a1008c0= 0x0
0x4a1008c4= 0x0
0x4a1008c8= 0x0
0x4a1008cc= 0x0
0x4a1008d0= 0x0
0x4a1008d4= 0x0
0x4a1008d8= 0x0
0x4a1008dc= 0x0
0x4a1008e0= 0x0
0x4a1008e4= 0x0
0x4a1008e8= 0x0
0x4a1008ec= 0x0
0x4a1008f0= 0x0
0x4a1008f4= 0x0
0x4a1008f8= 0x0
0x4a1008fc= 0x0
CPSW_STATS Registers:
0x4a100900= 0x0
0x4a100904= 0x0
0x4a100908= 0x0
0x4a10090c= 0x0
0x4a100910= 0x0
0x4a100914= 0x0
0x4a100918= 0x0
0x4a10091c= 0x0
0x4a100920= 0x0
0x4a100924= 0x0
0x4a100930= 0x0
0x4a100934= 0x0
0x4a100938= 0x0
0x4a10093c= 0x0
0x4a100940= 0x0
0x4a100944= 0x0
0x4a100948= 0x0
0x4a10094c= 0x0
0x4a100950= 0x0
0x4a100954= 0x0
0x4a100958= 0x0
0x4a10095c= 0x0
0x4a100960= 0x0
0x4a100964= 0x0
0x4a100968= 0x0
0x4a10096c= 0x0
0x4a100970= 0x0
0x4a100974= 0x0
0x4a100978= 0x0
0x4a10097c= 0x0
0x4a100980= 0x0
0x4a100984= 0x0
0x4a100988= 0x0
0x4a10098c= 0x0
CPDMA_STATERAM Registers:
0x4a100a00= 0x0
0x4a100a04= 0x0
0x4a100a08= 0x0
0x4a100a0c= 0x0
0x4a100a10= 0x0
0x4a100a14= 0x0
0x4a100a18= 0x0
0x4a100a1c= 0x0
0x4a100a20= 0x4a103000
0x4a100a24= 0x0
0x4a100a28= 0x0
0x4a100a2c= 0x0
0x4a100a30= 0x0
0x4a100a34= 0x0
0x4a100a38= 0x0
0x4a100a3c= 0x0
0x4a100a40= 0x0
0x4a100a44= 0x0
0x4a100a48= 0x0
0x4a100a4c= 0x0
0x4a100a50= 0x0
0x4a100a54= 0x0
0x4a100a58= 0x0
0x4a100a5c= 0x0
0x4a100a60= 0x0
0x4a100a64= 0x0
0x4a100a68= 0x0
0x4a100a6c= 0x0
0x4a100a70= 0x0
0x4a100a74= 0x0
0x4a100a78= 0x0
0x4a100a7c= 0x0
CPSW_CPTS Registers:
0x4a100c00= 0x4e8a0101
0x4a100c04= 0x0
0x4a100c0c= 0x0
0x4a100c10= 0x0
0x4a100c14= 0x0
0x4a100c20= 0x0
0x4a100c24= 0x0
0x4a100c28= 0x0
0x4a100c30= 0x0
0x4a100c34= 0x0
0x4a100c38= 0x0
CPSW_ALE Registers:
0x4a100d00= 0x290104
0x4a100d08= 0x80000004
0x4a100d10= 0x0
0x4a100d18= 0x0
0x4a100d20= 0x1
0x4a100d34= 0x0
0x4a100d38= 0x30017c66
0x4a100d3c= 0x9d5c0a71
0x4a100d40= 0x3
0x4a100d44= 0x3
0x4a100d48= 0x3
0x4a100d4c= 0x0
0x4a100d50= 0x0
0x4a100d54= 0x0
CPSW_SL1 Registers:
0x4a100d80= 0x170112
0x4a100d84= 0x180a0
0x4a100d88= 0x80000010
0x4a100d8c= 0x0
0x4a100d90= 0x5ee
0x4a100d94= 0x880000
0x4a100d98= 0x0
0x4a100d9c= 0x0
0x4a100da0= 0x0
0x4a100da4= 0x76543210
0x4a100da8= 0xc
CPSW_SL2 Registers:
0x4a100dc0= 0x170112
0x4a100dc4= 0x0
0x4a100dc8= 0x80000000
0x4a100dcc= 0x0
0x4a100dd0= 0x5ee
0x4a100dd4= 0x3000000
0x4a100dd8= 0x0
0x4a100ddc= 0x0
0x4a100de0= 0x0
0x4a100de4= 0x76543210
0x4a100de8= 0xc
CPSW_WR Registers:
0x4a101200= 0x4edb0100
0x4a101204= 0x0
0x4a101208= 0xa
0x4a10120c= 0x0
0x4a101210= 0x0
0x4a101214= 0x1
0x4a101218= 0x1
0x4a10121c= 0x0
0x4a101220= 0x0
0x4a101224= 0x0
0x4a101228= 0x0
0x4a10122c= 0x0
0x4a101230= 0x0
0x4a101234= 0x0
0x4a101238= 0x0
0x4a10123c= 0x0
0x4a101240= 0x0
0x4a101244= 0x0
0x4a101248= 0x0
0x4a10124c= 0x0
0x4a101250= 0x0
0x4a101254= 0x0
0x4a101258= 0x0
0x4a10125c= 0x0
0x4a101260= 0x0
0x4a101264= 0x0
0x4a101268= 0x0
0x4a10126c= 0x0
0x4a101270= 0x0
0x4a101274= 0x0
0x4a101278= 0x0
0x4a10127c= 0x0
0x4a101280= 0x0
0x4a101284= 0x0
0x4a101288= 0x5
Interrupt Controller Registers:
0x48200000= 0x50
0x48200010= 0x0
0x48200014= 0x1
0x48200040= 0x5f
0x48200044= 0xffffff80
0x48200048= 0x0
0x4820004c= 0x0
0x48200050= 0x0
0x48200060= 0x0
0x48200064= 0xffffffc0
0x48200068= 0xff
0x48200080= 0x302
0x48200084= 0xffffffff
0x48200088= 0x0
0x4820008c= 0x0
0x48200090= 0x0
0x48200094= 0x0
0x48200098= 0x0
0x4820009c= 0x0
0x482000a0= 0x0
0x482000a4= 0xfffff9ff
0x482000a8= 0x0
0x482000ac= 0x0
0x482000b0= 0x0
0x482000b4= 0x0
0x482000b8= 0x0
0x482000bc= 0x0
0x482000c0= 0x0
0x482000c4= 0x7fffffff
0x482000c8= 0x0
0x482000cc= 0x0
0x482000d0= 0x0
0x482000d4= 0x0
0x482000d8= 0x0
0x482000dc= 0x0
0x482000e0= 0x0
0x482000e4= 0xffffffff
0x482000e8= 0x0
0x482000ec= 0x0
0x482000f0= 0x0
0x482000f4= 0x0
0x482000f8= 0x0
0x482000fc= 0x0

   。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。

。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。

  哎呀,求助!!!

搞了好几天了,就是按照这个思路来的,求指点问题到底出在哪里?为什么当有数据包接收的时候,为什么无法进入数据包的接收中断

pengda qiu:

请教一下,与以太网接收中断有关的寄存器有哪些啊?

pengda qiu:

有没有谁知道以太网接收到的数据包的数量的寄存器是哪个啊?可不可以通过观看这个寄存器来观看数据的接收状态吗?

Yaoming Qin:

回复 pengda qiu:

如果您用的是最新的starterware,那么软件没有问题,但是需要配置正确。

请问您的网口是用的什么接口的?有没有针对MII/RMII/RGMII等进行配置?

谢谢!

pengda qiu:

回复 Yaoming Qin:

您好,首先感谢您的答复。

1.硬件使用的AR8031 接线和starter kit完全一致。

2.am335x 可以发送正确的数据包给电脑,是否就证明RGMII接口配置正确呢?

3.请问还有哪些需要配置呢?

starterware版本为02.00.01.01

4.我的判断问题的思路是否正确呢?根据我的判断是中断的问题

 盼复,谢谢

fa linag:

回复 pengda qiu:

你好,我目前也遇到你的问题,请问你是怎么解决的? 

赞(0)
未经允许不得转载:TI中文支持网 » 求助AM335x starterware DHCP获取IP失败的问题
分享到: 更多 (0)