当前位置:网站首页>Just learning embedded, I want to ask what is interrupt and what is the concept of interrupt
Just learning embedded, I want to ask what is interrupt and what is the concept of interrupt
2022-06-09 20:31:00 【Dafang teacher talks about SCM】
A simple life scene : The child sleeps in the bedroom , Mother is reading in the living room , that , How does a mother know her child is awake ?

· Always check in the room : A query
· Go into the room and sleep with the children , When a child wakes up, it will wake her up : Sleep - Wake up the
· Mom has a lot of work to do , But you can set an alarm clock to sleep with your child :poll The way
· Mother works in the room , The child wakes up by himself , Go out of the room and tell mom : Asynchronous notification
Back 3 Both ways require children to interrupt their mothers : Interrupt her sleep 、 Her job .


In fact, it can “ interrupt ” Mom has a lot to do
· Distant cat calls : Ignore
· Doorbell , The child cries : Corresponding to different treatments
· Under the weather : Get some rest
· A spider fell down : Run away
Mother is reading . The interrupted process :
· I'm reading a book
· All kinds of sounds occur : Interrupt source
o Distant cat calls
o The child cries
o Doorbell ...
How to deal with
· Put a bookmark in the book first , close the book : Save the scene
· To deal with : Interrupt service routine
· Come back and continue reading : Return processing
Interrupt in embedded system


CPU In the process of operation, it will be affected by various “ abnormal ” interrupt :
· Undefined
· Instructions 、 There's a problem with the data
· SWI: Soft interrupt
· Break it up
· interrupt
An interrupt is also an exception . There are many things that cause interruptions :
· Key
· Timer
· ADC convert network
· UART After sending data 、 Receive the data
· wait
These interrupt sources , To the interrupt controller , The interrupt controller selects the highest interrupt and notifies CPU
Interrupt processing flow
· initialization :
o Set interrupt source : What kind of interruption
o Set interrupt controller ( Mask an interrupt , Interrupt priority )
o Set up CPU Main switch : To interrupt
· Perform normal procedures :
· The interrupt : For example, press the button -> Interrupt controller -> CPU
· CPU If a command is not executed, it will be checked for interruption / The generation of anomalies
· CPU There was an interruption / abnormal , Start to deal with :
o For different exceptions , Jump to a different address to execute the program
o On this address , It's just a jump command , Jump to execute a function , This is the exception vector .
after 3 All the steps are done by hardware . The software does :
· Save the scene ( Various registers )
· Handling exceptions and interrupts
· Restore the scene
边栏推荐
- 95後大廠程序員删庫被判刑9個月
- UTM to latitude and longitude
- Jerry's modification to improve the output frame rate of camera source video [chapter]
- Apply for software code signing certificate
- 博文推荐|BookKeeper - Apache Pulsar 高可用 / 强一致 / 低延迟的存储实现
- C#中委托的应用
- 【RK2206】4. MQTT示例
- 查询sql
- [opencvsharpdnn] implementation example of yolov3 and Caffe in opencvsharp
- 高通:将坚持多元化的代工战略,关注英特尔代工商务合作条件
猜你喜欢

Leetcode stack and queue

Paramiko and thread pool demo (fast batch operation server)

2022年GDCPC广东省大学生程序设计竞赛题解

【opencvsharpDNN】OpenCvSharp中YoloV3和Caffe的实现示例

Ceisum三维场景demo

护网面试(杂)

NoSQL redis configuration and optimization (I blew the night breeze of Qinhuai River for you when you were not in Nanjing)

95 ans plus tard, le programmeur de Big Factory a été condamné à neuf mois de prison pour avoir supprimé la bibliothèque.

The HMI Software memory is abnormal, resulting in a crash exit bug

TypeScript 变量声明
随机推荐
Download the latest global epidemic history data to the two days before the current day
Fastjson解析JSON时乱序解决
Jerry's image transmission, recording card or camera displayed by UVC - description of high frame rate [article]
How to view Tekton's pipeline indicators
Target Segmentation -- semantic segmentation of multi category dataset by Unet
JVM-字节码是如何被JVM执行的+关于线程一点思想引子
SSL(Secure socket Layer)数字证书
Alibaba cloud 22q1 status summary, where are you going
【mysql】主从复制原理、搭建
C#Random的作用
华为云Stack首席架构师:打造“称手”的数字化工具,答好政企IT数字化转型这道必选题
Basic flow of data processing
moderlarts第二次培训笔记
VFP在64位win10环境下访问oracle出现的问题及解决方案
ConvNets Principles
开盘大涨近72%,国产CMP设备龙头华海清科登陆科创板
Unity-UI-Scrollbar组件
Ceisum三维场景demo
C#中关于Partial的作用
这6种实现负载均衡技术的方式不容错过