Loading...
首页专栏正文

DP83826E 自协商成功后链路丢失

 
1人已赏
free-jdx 发布于 2021-07-26 10:49:39 浏览 2356 点赞 93 收藏 0

1. 前言

使用DP83826E与Linux SDK ti-processor-sdk-linux-rt-am335x-evm-07.03.00.005 当用一根直线将板子连接到我的笔记本电脑上时 我看到连接在上升和下降 添加了一些调试信息来打印PHYSTS寄存器

显然,该设备正在尝试从10Base-T半双工和100Base-T全双工开始的每一种操作模式 即使当PHYSTS寄存器检测到信号和解码器锁(0x4F15) 链路将在状态寄存器的下一次轮询时下降 我应该配置哪些寄存器以使PHY工作在交叉电缆模式? (如果我把它连接到一个开关上,它就能工作了!)

[ 54.483271] 000: TI DP83826NC 4a332400.mdio:01: BMSR [0x01] = 0x786D
[ 54.483518] 000: TI DP83826NC 4a332400.mdio:01: PHYSTS [0x10] = 0x4115
[ 54.483801] 000: prueth pruss_eth eth1: Link is Up - 100Mbps/Full - flow control off
[ 54.483822] 000: TI DP83826NC 4a332400.mdio:01: PHY state change NOLINK -> RUNNING
[ 54.483861] 000: IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[ 55.523375] 000: TI DP83826NC 4a332400.mdio:01: BMSR [0x01] = 0x7849
[ 55.523621] 000: TI DP83826NC 4a332400.mdio:01: PHYSTS [0x10] = 0x0912
[ 55.523661] 000: prueth pruss_eth eth1: Link is Down
[ 55.523672] 000: TI DP83826NC 4a332400.mdio:01: PHY state change RUNNING -> NOLINK
[ 56.563312] 000: TI DP83826NC 4a332400.mdio:01: BMSR [0x01] = 0x786D
[ 56.563563] 000: TI DP83826NC 4a332400.mdio:01: PHYSTS [0x10] = 0x0F15
[ 56.563845] 000: prueth pruss_eth eth1: Link is Up - 100Mbps/Full - flow control off
[ 56.563866] 000: TI DP83826NC 4a332400.mdio:01: PHY state change NOLINK -> RUNNING
[ 57.603273] 000: TI DP83826NC 4a332400.mdio:01: BMSR [0x01] = 0x7849
[ 57.603517] 000: TI DP83826NC 4a332400.mdio:01: PHYSTS [0x10] = 0x4912
[ 57.603560] 000: prueth pruss_eth eth1: Link is Down
[ 57.603570] 000: TI DP83826NC 4a332400.mdio:01: PHY state change RUNNING -> NOLINK
[ 58.643276] 000: TI DP83826NC 4a332400.mdio:01: BMSR [0x01] = 0x7849
[ 58.643523] 000: TI DP83826NC 4a332400.mdio:01: PHYSTS [0x10] = 0x0902
[ 59.683270] 000: TI DP83826NC 4a332400.mdio:01: BMSR [0x01] = 0x786D
[ 59.683518] 000: TI DP83826NC 4a332400.mdio:01: PHYSTS [0x10] = 0x4F15
[ 59.683799] 000: prueth pruss_eth eth1: Link is Up - 100Mbps/Full - flow control off
[ 59.683821] 000: TI DP83826NC 4a332400.mdio:01: PHY state change NOLINK -> RUNNING
[ 60.723388] 000: TI DP83826NC 4a332400.mdio:01: BMSR [0x01] = 0x7849
[ 60.723634] 000: TI DP83826NC 4a332400.mdio:01: PHYSTS [0x10] = 0x0912
[ 60.723674] 000: prueth pruss_eth eth1: Link is Down
[ 60.723686] 000: TI DP83826NC 4a332400.mdio:01: PHY state change RUNNING -> NOLINK
[ 61.763269] 000: TI DP83826NC 4a332400.mdio:01: BMSR [0x01] = 0x786D
[ 61.763514] 000: TI DP83826NC 4a332400.mdio:01: PHYSTS [0x10] = 0x4F15
[ 61.763796] 000: prueth pruss_eth eth1: Link is Up - 100Mbps/Full - flow control off
[ 61.763818] 000: TI DP83826NC 4a332400.mdio:01: PHY state change NOLINK -> RUNNING
[ 62.803317] 000: TI DP83826NC 4a332400.mdio:01: BMSR [0x01] = 0x7849
[ 62.803585] 000: TI DP83826NC 4a332400.mdio:01: PHYSTS [0x10] = 0x4912
[ 62.803626] 000: prueth pruss_eth eth1: Link is Down
[ 62.803637] 000: TI DP83826NC 4a332400.mdio:01: PHY state change RUNNING -> NOLINK
[ 63.843269] 000: TI DP83826NC 4a332400.mdio:01: BMSR [0x01] = 0x7849
[ 63.843515] 000: TI DP83826NC 4a332400.mdio:01: PHYSTS [0x10] = 0x0902
[ 64.883273] 000: TI DP83826NC 4a332400.mdio:01: BMSR [0x01] = 0x7849
[ 64.883520] 000: TI DP83826NC 4a332400.mdio:01: PHYSTS [0x10] = 0x0912

当连接到以太网交换机时,我添加寄存器值,直到我断开电缆:

[ 61.683376] 000: TI DP83826NC 4a332400.mdio:01: BMSR [0x01] = 0x786D
[ 61.683623] 000: TI DP83826NC 4a332400.mdio:01: PHYSTS [0x10] = 0x5115
[ 61.683908] 000: prueth pruss_eth eth1: Link is Up - 100Mbps/Full - flow control off
[ 61.683930] 000: TI DP83826NC 4a332400.mdio:01: PHY state change NOLINK -> RUNNING
[ 61.683971] 000: IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[ 62.723894] 000: TI DP83826NC 4a332400.mdio:01: BMSR [0x01] = 0x786D
[ 62.724149] 000: TI DP83826NC 4a332400.mdio:01: PHYSTS [0x10] = 0x5715
[ 63.763383] 000: TI DP83826NC 4a332400.mdio:01: BMSR [0x01] = 0x786D
[ 63.763628] 000: TI DP83826NC 4a332400.mdio:01: PHYSTS [0x10] = 0x5715
....................
[ 76.243409] 000: TI DP83826NC 4a332400.mdio:01: BMSR [0x01] = 0x7849
[ 76.243678] 000: TI DP83826NC 4a332400.mdio:01: PHYSTS [0x10] = 0x5912
[ 76.243722] 000: prueth pruss_eth eth1: Link is Down
[ 76.243732] 000: TI DP83826NC 4a332400.mdio:01: PHY state change RUNNING -> NOLINK
[ 77.283380] 000: TI DP83826NC 4a332400.mdio:01: BMSR [0x01] = 0x7849
[ 77.283629] 000: TI DP83826NC 4a332400.mdio:01: PHYSTS [0x10] = 0x5902

2. 原理图

3. 问题梳理

当强制MDI/MDIX分辨率的速度时,问题是否仍然存在? 电缆长度是多少? 是否启用了快速链接特性(寄存器0xB)? 如果是,当禁用快速链路删除时是否会发生链路删除?

如果我强制速度到100 Mbps和全双工(寄存器0x0在0x2100),我也能得到连接,当电缆连接到我的电脑。 如果在基本模式下支持直/交叉电缆检测,我们也在徘徊。

是的,该设备应该完全支持auto-MDIX特性 这里是注册状态与连接,但没有任何传输 所以快速链接下降是不启用的 电缆长2米

[ 173.927654] 000: TI DP83826NC 4a332400.mdio:01: BMCR [0x00] = 0x2100
[ 173.927921] 000: TI DP83826NC 4a332400.mdio:01: CR1 [0x09] = 0x0000
[ 173.928166] 000: TI DP83826NC 4a332400.mdio:01: CR2 [0x0A] = 0x0100
[ 173.928410] 000: TI DP83826NC 4a332400.mdio:01: CR3 [0x0B] = 0x0000
[ 173.928655] 000: TI DP83826NC 4a332400.mdio:01: BMSR [0x01] = 0x784D
[ 173.928898] 000: TI DP83826NC 4a332400.mdio:01: PHYSTS [0x10] = 0x0605

4. RJ45连接器

还添加了部分原理图的RJ45连接器。

发现示意图有什么大问题

5. 结论

已经能够修复自动协商,无论是直接电缆(交换机连接)和交叉链接(PC连接) 这可能是由于水晶头连接器没有很好地焊接,因为我们不能看到TX脉冲在开始

还发现在电路的另一部分,引脚28上的一个上拉电阻,迫使设备进入RMII模式,而不是PRU预期的MII模式(我们有一个50 MHz的CLK,而不是25 MHz) 我们移除了向上拉,我们增加了向下拉来强制MII模式 现在工作正常

*本文仅代表作者观点,不代表易百纳技术社区立场。系作者授权易百纳技术社区发表,未经许可不得转载。

精彩评论

内容存在敏感词
打赏
打赏作者
free-jdx
您的支持将鼓励我继续创作!
金额:
¥1 ¥5 ¥10 ¥50 ¥100
支付方式:
微信支付
支付宝支付
微信支付
打赏成功!

感谢您的打赏,如若您也想被打赏,可前往 发表专栏 哦~

易百纳技术社区
确定要删除此文章、专栏、评论吗?
确定
取消
易百纳技术社区