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

DP83822I: RMII模式上网,能ping通,但是网速只能自动协商10Mbps,不能使用100Mbps

Part Number:DP83822I

在ARM A7上使用DP83822I phy芯片的rmii通信模式。调试后发现只能通过10Mbps/Full ping通我的服务端,我尝试强制设置100Mbps/Full速率结果是失败的。我的服务端是100Mbps/Full,就导致了大量的丢包。是不是寄存器配置有问题?下面展示的当前通信情况,和当前寄存器数据:

root@:~# fec 2188000.ethernet eth0: Link is Down

root@:~# fec 2188000.ethernet eth0: Link is Up – 100Mbps/Full – flow control rx/tx
fec 2188000.ethernet eth0: Link is Down
fec 2188000.ethernet eth0: Link is Up – 100Mbps/Full – flow control rx/tx
fec 2188000.ethernet eth0: Link is Down
fec 2188000.ethernet eth0: Link is Up – 100Mbps/Full – flow control rx/tx
fec 2188000.ethernet eth0: Link is Down
fec 2188000.ethernet eth0: Link is Up – 100Mbps/Full – flow control rx/tx
fec 2188000.ethernet eth0: Link is Down
fec 2188000.ethernet eth0: Link is Up – 10Mbps/Full – flow control rx/tx

root@:~# ping 192.168.1.100
PING 192.168.1.100 (192.168.1.100) 56(84) bytes of data.
64 bytes from 192.168.1.100: icmp_seq=1 ttl=200 time=1.85 ms
64 bytes from 192.168.1.100: icmp_seq=2 ttl=200 time=0.909 ms
64 bytes from 192.168.1.100: icmp_seq=3 ttl=200 time=1.25 ms
64 bytes from 192.168.1.100: icmp_seq=4 ttl=200 time=1.01 ms
64 bytes from 192.168.1.100: icmp_seq=5 ttl=200 time=1.09 ms
64 bytes from 192.168.1.100: icmp_seq=6 ttl=200 time=1.04 ms
64 bytes from 192.168.1.100: icmp_seq=7 ttl=200 time=1.05 ms
64 bytes from 192.168.1.100: icmp_seq=8 ttl=200 time=1.22 ms
64 bytes from 192.168.1.100: icmp_seq=9 ttl=200 time=1.18 ms
64 bytes from 192.168.1.100: icmp_seq=10 ttl=200 time=1.24 ms
64 bytes from 192.168.1.100: icmp_seq=11 ttl=200 time=1.02 ms
64 bytes from 192.168.1.100: icmp_seq=12 ttl=200 time=0.970 ms
64 bytes from 192.168.1.100: icmp_seq=13 ttl=200 time=1.15 ms
64 bytes from 192.168.1.100: icmp_seq=14 ttl=200 time=1.02 ms
64 bytes from 192.168.1.100: icmp_seq=15 ttl=200 time=0.923 ms
64 bytes from 192.168.1.100: icmp_seq=16 ttl=200 time=1.17 ms
64 bytes from 192.168.1.100: icmp_seq=17 ttl=200 time=1.07 ms
64 bytes from 192.168.1.100: icmp_seq=18 ttl=200 time=1.08 ms
64 bytes from 192.168.1.100: icmp_seq=19 ttl=200 time=1.12 ms
64 bytes from 192.168.1.100: icmp_seq=21 ttl=200 time=1.10 ms
64 bytes from 192.168.1.100: icmp_seq=22 ttl=200 time=0.871 ms
64 bytes from 192.168.1.100: icmp_seq=24 ttl=200 time=1.18 ms
^C
— 192.168.1.100 ping statistics —
24 packets transmitted, 22 received, 8% packet loss, time 23042ms
rtt min/avg/max/mdev = 0.871/1.116/1.850/0.195 ms
root@:~#

phy addr          value

0x0000             0x3100

0x0001             0x786d

0x0002             0x2000

0x0003             0xa240

0x0004             0x5e1

0x0005             0xcc61

0x0006             0xf

0x0007             0x2001

0x0008             0x4006

0x0009             0x0

0x000a             0x100

0x000b             0x1000    

0x000f             0x0

0x0010             0x1817

0x0011             0x108

0x0012             0xf600

0x0013             0x2200       

0x0016             0x100

0x0017             0xa1

0x0018             0x400

0x0019             0x3000         

Cherry Zhou:

您好,您的问题我们需要升级到英文论坛寻求帮助,如有答复将尽快回复您。

,

Cherry Zhou:

您好,

从日志中可以看到,link partner side根本没有广播100M。 该地址从寄存器0x0005可见。 您能否查看一下该情况?

,

jefferry john:

我是用同一根网线测试我们的PCB上的另外一个网口(eth1)。当网线插上去后,会自动协商100baseTx-FD,并且显示 link partner是正常的。但是在插到eth0(DP83822)上后 link partner显示就不是正常的:

root@imx6ul7d:~# mii-tool -veth0: negotiated 10baseT-FD flow-control, link ok product info: vendor 08:00:28, model 36 rev 0 basic mode: collision test, autonegotiation enabled basic status: autonegotiation complete, link ok capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control link partner: 10baseT-FD 10baseT-HD flow-controleth1: no link product info: vendor 00:07:32, model 8 rev 2 basic mode: autonegotiation enabled basic status: no link capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-controlSIOCGMIIPHY on 'eth2' failed: Operation not supportedroot@imx6ul7d:~# fec 2188000.ethernet eth0: Link is Down

root@imx6ul7d:~#root@imx6ul7d:~# ifconfig eth1 upIPv6: ADDRCONF(NETDEV_UP): eth1: link is not readyroot@imx6ul7d:~# ifconfig eth1 upIPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready

root@imx6ul7d:~# ifconfig eth1 uproot@imx6ul7d:~# ifconfig eth1 192.168.2.137root@imx6ul7d:~#root@imx6ul7d:~# ping 192.168.2.100PING 192.168.2.100 (192.168.2.100) 56(84) bytes of data.64 bytes from 192.168.2.100: icmp_seq=1 ttl=200 time=2.45 ms^C— 192.168.2.100 ping statistics —1 packets transmitted, 1 received, 0% packet loss, time 0msrtt min/avg/max/mdev = 2.452/2.452/2.452/0.000 msroot@imx6ul7d:~#root@imx6ul7d:~#root@imx6ul7d:~# mii-tool -veth0: no link product info: vendor 08:00:28, model 36 rev 0 basic mode: collision test, autonegotiation enabled basic status: no link capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-controleth1: negotiated 100baseTx-FD flow-control, link ok product info: vendor 00:07:32, model 8 rev 2 basic mode: autonegotiation enabled basic status: autonegotiation complete, link ok capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-controlroot@imx6ul7d:~#

,

Cherry Zhou:

您好,

您提供的信息我们已反馈给工程师,由于假期在即,我们可能无法及时地向您转达最新信息,您也可以通过以下链接来查看该问题的最新进展:

https://e2e.ti.com/support/interface-group/interface/f/interface-forum/1271717/dp83822i-network-speed-issue

,

Cherry Zhou:

您好,

请问您使用的link partner是什么? 是否方便分享下设置的方框图?

请问您在上面分享的log,是在连接到 DP83822的主机上捕获的吗?

,

jefferry john:

我使用的link partner是PC:

 .

是的,我是在连接到 DP83822的主机上捕获的。

,

Cherry Zhou:

感谢您提供的信息。

是 ETH1 (PCB 的其他端口) DP83822还是其他一些 PHY?

您试下做一个测试,将 eth1端口连接到 eth0,看下器件是否在100M-FD 模式下建立链路?同时请分享下在该测试期间0x00至 0x1F、0x0467、0x0468 寄存器的日志。

,

jefferry john:

 ETH1使用的是其它phy,不是DP83822。ETH0使用的是DP83822,寄存器日志如下:

0x00              0x3100

0x1F              0x0

0x0467          0x2001

0x0468          0x4006

,

Cherry Zhou:

Cherry Zhou said:您试下做一个测试,将 eth1端口连接到 eth0,看下器件是否在100M-FD 模式下建立链路?

您能试下将 eth1连接到 eth0(而不是连接到 PC) 后再检查链路和速度吗?

Cherry Zhou said:同时请分享下在该测试期间0x00至 0x1F、0x0467、0x0468 寄存器的日志。

能否分享下寄存器0x00至0x1F (从0x00至0x1F 的所有寄存器,而不仅仅是0x00和0x1F)以及0x467、0x468的日志(在上述测试期间)?

您能否分享一下该板的原理图?

,

jefferry john:

我尝试将 eth1连接到 eth0,结果是失败的。不知道什么原因建立不起连接。

原理图:

,

Cherry Zhou:

您好,

1)Strapping配置并不是很合理。 根据原理图,您希望使用 PHY 地址为0的 RMII 模式,但 RX_DV 未设置为模式3。 原理图中对strap模式的描述与要求和原理图中想要实现的内容并不匹配。

2)LED_1不应是低电平有效 LED,除非它通过 strap 配置连接到模式4。 根据log,LED_1会strap到不应使用的模式。建议取消 LED_1上的连接。

3)请检查 PHY 是需要处于 RMII 模式还是 RMII_50模式,并相应地配置straps。

,

jefferry john:

你这里说的1)和3)应该描述的是同一个问题,对于这个问题我们已经确定的是PHY需要RMII_50模式,并且已经将 RX_DV配置为模式4(只不过截图中没有更改)。

2)我们现在对LED没有需求,暂时可以先忽略它

,

jefferry john:

,

Cherry Zhou:

了解了,已转达给工程师。

,

Cherry Zhou:

你好,

根据log,Strapping 配置似乎没有办法正常进行。

能否在取消填充电路板上的 LED4和 LED5组件后,重新捕获0x00至0x1F 和0x0467和0x468寄存器的日志并分享下?

,

jefferry john:

取消填充电路板上的 LED4和 LED5组件后:

phy addr          value

0x0000             0x3100

0x0001             0x786d

0x0002             0x2000

0x0003             0xa240

0x0004             0x5e1

0x0005             0xcc61

0x0006             0xd

0x0007             0x2001

0x0008             0x4006

0x0009             0x0

0x000a             0x100

0x000b             0x1000    

0x000f             0x0

0x0010             0x1817

0x0011             0x108

0x0012             0xf600

0x0013             0x2200       

0x0016             0x100

0x0017             0xa1

0x0018             0x400

0x0019             0x300

0x001a             0x10

0x001b            0x7d

0x001c            0x5ee

0x001d            0x0

0x001e            0x2

0x001f             0x0

0x0467            0x2001

0x0468            0x4006

,

Cherry Zhou:

好的已转达给工程师。

,

Cherry Zhou:

您好,

从您分享的寄存器0x0467、0x0468的日志来看你,有一些错误会导致关于strapping的结论错误。

详细查看寄存器0x0467和0x0468的值,会发现这些值是寄存器0x0007和0x0008的镜像。 这意味着扩展寄存器访问未被正确使用。要想正确读取寄存器0x0467和0x0468,请遵循数据表第8.4.2.1节中概述的间接访问。

以上内容可以看出strapping没有问题,但CRS 引脚没有正确安装寄存器。 请纠正 CRS 引脚上的上拉和下拉电阻器。 CRS 引脚上的这个错误电阻器应该不会影响链路建立,不过问题是其他方面的。

从日志中可以看出,link partner仍然没有广播100M 全双工。 请参阅寄存器0x5描述。

为了找出究竟是 DP83822的问题还是link partner问题,您是否可以连接 eth0和 eth1端口并分享下0x00到0x1F、0x0467、0x0468寄存器的日志?

您可以通过连接两个 DP83822电路板来执行该实验。 也可以使用此设置共享日志。

,

jefferry john:

我们根据你的指导,把两个DP83822的eth网口用网线进行连接,启动上电后发现他们并没有建立网络连接,就和什么都没有插一样。也就是说只有在和PC连接的时候才会有反应

,

Cherry Zhou:

您好,

不太明白您指的没有建立网络连接。

问题的关键在于我们不是在寻找 ping,而是要了解链路是否建立。 连接两个 DP83822时,您是否看能到链路建立?

此外能否分享寄存器0x00至0x1F、0x0467、0x0468的日志,这样对我们帮助调试会有很大帮助,谢谢。

,

jefferry john:

1.您是否看能到链路建立?  回答: 没有建立

2.能否分享寄存器0x00至0x1F、0x0467、0x0468的日志?  回答:既然都没有建立,这些寄存器的值没有变化,和上面分享一样

,

Cherry Zhou:

了解了。

,

Cherry Zhou:

Hi,

在之前分享的日志中,并没有寄存器0x0467和0x0468的正确值。

在两个 DP83822之间的链路的日志中,您能否确认0x0004和0x0005的值是相同的? 应该要与上述日志中的值不同。

能否分享下在DP83822 PHY 上0x0004和0x0005的值?

,

jefferry john:

phy addr          value

0x0467             0x2001

0x0468             0x5802

0x0004             0x5e1

0x0005             0xcde1

,

Cherry Zhou:

感谢您提供的信息,工程师正在查看中。

,

jefferry john:

查看一周了,效率简直是太低了,让人难过

,

Cherry Zhou:

抱歉我们来催促下工程师,您也可以通过查看以下链接来获取最新进展:

https://e2e.ti.com/support/interface-group/interface/f/interface-forum/1271717/dp83822i-network-speed-issue

,

jefferry john:

谁告诉你的问题已解决?怎么解决的能告知一下吗?

,

Cherry Zhou:

抱歉该按钮我们这边无法点击哦,您可以看下是不是误触,也有可能是系统的bug。给您带来的不便敬请谅解。

请看工程师的最新答复:

There has been quite a bit of back and forth and I want to be sure that I'm understanding the setup and issue correctly. You are able to communicate in 10 Mbps but the goal is 100 Mbps, where you are currently seeing packet-loss.

Generally in Debugs the first step would be what we mentioned above:

Read Registers 0x0467 & 0x0468. The purpose of doing this is to confirm that the PHY is in the correct Mode. 

The following FAQ provides more details as to how these registers might be affected

How to Confirm Ethernet PHY Strapping

As Gokul mentioned before, both of these registers are Extended Registers and cannot be read directly.

This FAQ provides more details on how to perform extended register reads

Extended Registers

Has the Schematic been updated to reflect the strap settings? Below is our schematic checklist that can be given to the user

The Pin-wise Checklist tab will help with pin connections
The Straps Tool tab helps choose the correct strapping resistors to achieve the correct mode.
Please note that Orange Boxes are drop down menus that can be selected

0243.DP83822_Schematic_Design_Review_Checklist.xlsb

I apologize if it feels like you have already gone through these steps, but I want to be sure that PHY settings are correct. If the PHY is in the wrong mode, it'd be no wonder that it is misbehaving.

赞(0)
未经允许不得转载:TI中文支持网 » DP83822I: RMII模式上网,能ping通,但是网速只能自动协商10Mbps,不能使用100Mbps
分享到: 更多 (0)