当前位置:网站首页>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链接。
边栏推荐
- ctf-pikachu-XSS
- Objective-C member variable permissions
- 透过JVM-SANDBOX源码,了解字节码增强技术原理
- Two sides of the evening: tell me about the bloom filter and cuckoo filter? Application scenario? I'm confused..
- [book club issue 13] packaging format of video files
- 疫情来袭--远程办公之思考|社区征文
- Epidemic strikes -- Thinking about telecommuting | community essay solicitation
- leetcode刷题:二叉树06(对称二叉树)
- leetcode刷题:二叉树05(翻转二叉树)
- Small record of thinking
猜你喜欢
Understand the principle of bytecode enhancement technology through the jvm-sandbox source code
*. No main manifest attribute in jar
LNK2038 检测到“RuntimeLibrary”的不匹配项: 值“MD_DynamicRelease”不匹配值“MDd_DynamicDebug”(main.obj 中)
Parameterization of controls in katalon
Two sides of the evening: tell me about the bloom filter and cuckoo filter? Application scenario? I'm confused..
Cesiumjs 2022^ source code interpretation [0] - article directory and source code engineering structure
指针数组和数组指针
毕业设计:设计秒杀电商系统
leetcode刷题:二叉树09(二叉树的最小深度)
Introduction to asynchronous task capability of function calculation - task trigger de duplication
随机推荐
2022-07-03: there are 0 and 1 in the array. Be sure to flip an interval. Flip: 0 becomes 1, 1 becomes 0. What is the maximum number of 1 after turning? From little red book. 3.13 written examination.
[Logitech] m720
CesiumJS 2022^ 源码解读[0] - 文章目录与源码工程结构
How to dynamically cache components in Vue multi-level route nesting
LevelDB源码解读-SkipList
The three-year revenue is 3.531 billion, and this Jiangxi old watch is going to IPO
还原窗口位置的微妙之处
pytest多进程/多线程执行测试用例
Balance between picture performance of unity mobile game performance optimization spectrum and GPU pressure
Unity 绘制弹球和台球的运动轨迹
JDBC 进阶
Small record of thinking
Katalon framework tests web (XXI) to obtain element attribute assertions
SQL statement strengthening exercise (MySQL 8.0 as an example)
Pandora IOT development board learning (HAL Library) - Experiment 6 independent watchdog experiment (learning notes)
三菱M70宏变量读取三菱M80公共变量采集三菱CNC变量读取采集三菱CNC远程刀补三菱机床在线刀补三菱数控在线测量
leetcode刷题:二叉树09(二叉树的最小深度)
Flink学习6:编程模型
Mitsubishi M70 macro variable reading Mitsubishi M80 public variable acquisition Mitsubishi CNC variable reading acquisition Mitsubishi CNC remote tool compensation Mitsubishi machine tool online tool
leetcode刷题:二叉树08(N叉树的最大深度)