当前位置:网站首页>DP83848+网线热拔插
DP83848+网线热拔插
2022-07-04 03:51:00 【pingxiaozhao】
过程说明

1掉电和中断
掉电和中断功能在设备的7脚上复用。默认情况下,这个pin作为断电输入,中断功能被禁用。设置MICR位0 (INT_OE)(0x11h)将引脚配置为一个激活的低电平中断输出。
2掉电控制模式
PWRDOWN_INT引脚可以被断言为低电平以将设备置于Power Down模式。这是相当于在基本模式控制寄存器BMCR (0x00h)中设置第11位(下电)。一个外部利用控制信号驱动引脚低,克服了内部上拉电阻较弱的缺点。另外,通过使用外部下拉电阻,设备可以配置为初始化到Power Down状态在PWRDOWN_INT引脚上。由于设备仍然会响应管理寄存器的访问,设置MICR寄存器中INT_OE位将禁用PWRDOWN_INT输入,允许设备退出断电状态。
3中断机制
中断功能通过寄存器访问来控制。 默认情况下,所有中断源都是禁用的。 将MICR(0x11h)的位1(INTEN)置1将使中断输出,具体取决于在MISR(0x12h)的低字节中设置的中断屏蔽。 发生中断条件时,PWRDOWN_INT引脚异步置为低电平。 可以通过读取MISR的高字节来确定中断源。 MISR中的一位或多位将被置1,表示所有当前未决的中断。 读取MISR会清除所有未决的中断。
示例:要在链接状态更改或能量检测电源状态更改时生成中断,步骤如下:
•将0003h写入MICR以设置INTEN和INT_OE
•向MISR写入0060h以设置ED_INT_EN和LINK_INT_EN
•监控器PWRDOWN_INT引脚
当PWRDOWN_INT引脚为低电平时,用户将读取MISR寄存器以查看ED_INT或LINK_INT位置1,例如,引起中断的源。 读取MISR后,中断位应清零,PWRDOWN_INT引脚将置为无效。
寄存器



代码说明
1. DP83848的7脚INT接入MCU的IO口,IO配置为外部中断,
2.设置MICR(0x11)的INTEN和INT_OE位为1,
3.设置MISR(0x12)的ED_INT_EN和LINK_INT_EN位为1,
4.在外部中断中查看MISR(0x12)中ED_INT和LINK_INT位是否置1,
5.若ED_INT和LINK_INT位为1,则进一步查看BMSR(0x01)的LINK STATUS和AUTO-NEGOTIATION 位是否为1,若为1则说明网线已插入,初始化网络并创建tcp链接;若不为1则说明网线已拔出,关闭tcp链接。
边栏推荐
- 用于TCP协议交互的TCPClientDemo
- 01 qemu 启动编译好的镜像 VFS: Unable to mount root fs on unknown-block(0,0)
- 透过JVM-SANDBOX源码,了解字节码增强技术原理
- Katalon uses script to query list size
- Katalon中控件的参数化
- Brief explanation of depth first search (with basic questions)
- [Huawei cloud IOT] reading notes, "Internet of things: core technology and security of the Internet of things", Chapter 3 (I)
- SQL statement strengthening exercise (MySQL 8.0 as an example)
- 图解网络:什么是热备份路由器协议HSRP?
- pytest多进程/多线程执行测试用例
猜你喜欢

Flink学习7:应用程序结构

2021 RSC | Drug–target affinity prediction using graph neural network and contact maps

Global exposure and roller shutter exposure of industrial cameras

Pointer array and array pointer

leetcode刷题:二叉树06(对称二叉树)

干货!基于GAN的稀有样本生成
![Cesiumjs 2022^ source code interpretation [0] - article directory and source code engineering structure](/img/ba/c1d40de154344ccc9f2fd1dd4cb12f.png)
Cesiumjs 2022^ source code interpretation [0] - article directory and source code engineering structure

idea修改主体颜色

Two sides of the evening: tell me about the bloom filter and cuckoo filter? Application scenario? I'm confused..

Mindmanager2022 efficient and easy to use office mind map MindManager
随机推荐
Katalon uses script to query list size
Idea configuration 360zip open by default -- external tools
2021 RSC | Drug–target affinity prediction using graph neural network and contact maps
Pytest multi process / multi thread execution test case
Three years of graduation, half a year of distance | community essay solicitation
Rhcsa-- day one
【读书会第十三期】视频文件的封装格式
量子力学习题
[Logitech] m720
Msgraphmailbag - search only driveitems of file types
函数计算异步任务能力介绍 - 任务触发去重
【华为云IoT】读书笔记之《万物互联:物联网核心技术与安全》第3章(上)
Katalon框架测试web(二十六)自动发邮件
Flink学习6:编程模型
Pandora IOT development board learning (HAL Library) - Experiment 6 independent watchdog experiment (learning notes)
Epidemic strikes -- Thinking about telecommuting | community essay solicitation
指针数组和数组指针
Exercices de renforcement des déclarations SQL (MySQL 8.0 par exemple)
Idea modify body color
【CSRF-01】跨站请求伪造漏洞基础原理及攻防