DP83826E 自协商成功后链路丢失

free-jdx 2021-07-17 16:19:56 4233
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
红包 93 收藏 评论 打赏
评论
0个
内容存在敏感词
手气红包
    易百纳技术社区暂无数据
相关专栏
置顶时间设置
结束时间
删除原因
  • 广告/SPAM
  • 恶意灌水
  • 违规内容
  • 文不对题
  • 重复发帖
打赏作者
易百纳技术社区
free-jdx
您的支持将鼓励我继续创作!
打赏金额:
¥1易百纳技术社区
¥5易百纳技术社区
¥10易百纳技术社区
¥50易百纳技术社区
¥100易百纳技术社区
支付方式:
微信支付
支付宝支付
易百纳技术社区微信支付
易百纳技术社区
打赏成功!

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

举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

审核成功

发布时间设置
发布时间:
是否关联周任务-专栏模块

审核失败

失败原因
备注
拼手气红包 红包规则
祝福语
恭喜发财,大吉大利!
红包金额
红包最小金额不能低于5元
红包数量
红包数量范围10~50个
余额支付
当前余额:
可前往问答、专栏板块获取收益 去获取
取 消 确 定

小包子的红包

恭喜发财,大吉大利

已领取20/40,共1.6元 红包规则

    易百纳技术社区