当前位置:网站首页>STM32 - introduction of external interrupts exti and NVIC
STM32 - introduction of external interrupts exti and NVIC
2022-07-03 01:36:00 【Spade fish】
STM32—— External interrupt EXTI and NVIC Introduction to
List of articles
What interruption is ?
Stop what you are doing and get busy with something else , After you finish your work, come back and continue to do what you are doing
Interrupt what you did ——> Interrupt work
Keep the scene —— Keep the work progress
Handling interrupts ——> The conversation
Back to the scene ——> Keep working
How to configure interrupts
1、 Initializes the used to interrupt GPIO mouth
2、 initialization EXTI( What is? EXTI?)
Edge detection circuit ——> Rising edge / Falling edge trigger interrupt
EXTI Is an external interrupt source , Yes 20 Interrupt or event line
3、 To configure NVIC ( Interrupt priority )
Configure interrupt priority , Break nesting
4、 Write interrupt service function
EXTI Structure
1、EXTI_Line:EXTI interrupt / Event line selection , Optional EXTI0 to EXTI19(stm32f10x_exti.h)
2、EXTI_Mode: EXTI Mode selection , The optional mode is generate interrupt / Produce an event
3、EXTI_Trigger: EXTI Edge triggered events , Optional rising edge trigger , Falling edge trigger Or both rising and falling edges trigger
4、EXTI_LineCmd: Control whether to enable EXTI Line , Can make EXTI Line or disable .
typedef struct
{
uint32_t EXTI_Line; /* Select the break line */
EXTIMode_TypeDef EXTI_Mode; /* Select shielding ; Interrupt frequency closure 、 Event masking */
EXTITrigger_TypeDef EXTI_Trigger; /* Select trigger mode : Rising edge 、 Falling edge 、 Software interruption events */
FunctionalState EXTI_LineCmd; /* Can make */
}EXTI_InitTypeDef;
NVIC Structure
typedef struct
{
uint8_t NVIC_IRQChannel;
uint8_t NVIC_IRQChannelPreemptionPriority;
uint8_t NVIC_IRQChannelSubPriority;
FunctionalState NVIC_IRQChannelCmd;
} NVIC_InitTypeDef;
1、NVIC_IRQChannel: Set interrupt channel (misc.h)
2、NVIC_IRQChannelPreemptionPriority: Set preemption priority
3、NVIC_IRQChannelSubPriority: Set sub priority
4、NVIC_IRQChannelCmd: Control whether to enable Interrupt controller , Can make Or disable .

边栏推荐
- C application interface development foundation - form control (3) - file control
- A simple tool for analyzing fgui dependencies
- Arduino dy-sv17f automatic voice broadcast
- The industrial scope of industrial Internet is large enough. The era of consumer Internet is only a limited existence in the Internet industry
- MySQL --- 数据库查询 - 基本查询
- [Cao gongzatan] after working in goose factory for a year in 2021, some of my insights
- What are the trading forms of spot gold and what are the profitable advantages?
- The difference between tail -f, tail -f and tail
- [Androd] Gradle 使用技巧之模块依赖替换
- 【数据挖掘】任务6:DBSCAN聚类
猜你喜欢
![[data mining] task 6: DBSCAN clustering](/img/af/ad7aa523b09884eee967c6773a613f.png)
[data mining] task 6: DBSCAN clustering

【数据挖掘】任务3:决策树分类

MySQL --- 数据库查询 - 基本查询

【QT】自定义控件的封装

Androd gradle's substitution of its use module dependency

Why can't the start method be called repeatedly? But the run method can?

并发编程的三大核心问题 -《深入理解高并发编程》

Tâche 6: regroupement DBSCAN

C#应用程序界面开发基础——窗体控制(2)——MDI窗体

Three core issues of concurrent programming - "deep understanding of high concurrent programming"
随机推荐
Scheme and practice of cold and hot separation of massive data
Common English Vocabulary
LDC Build Shared Library
Using tensorboard to visualize the model, data and training process
Type expansion of non ts/js file modules
【数据挖掘】任务3:决策树分类
【数据挖掘】任务5:K-means/DBSCAN聚类:双层正方形
LeetCode 987. Vertical order transverse of a binary tree - Binary Tree Series Question 7
Androd gradle's substitution of its use module dependency
数学知识:Nim游戏—博弈论
Expérience de recherche d'emploi d'un programmeur difficile
Mathematical Knowledge: Steps - Nim Games - Game Theory
Makefile中wildcard、patsubst、notdir的含义
音程的知识的总结
Give you an array numbers that may have duplicate element values. It was originally an array arranged in ascending order, and it was rotated once according to the above situation. Please return the sm
d. LDC build shared library
[understanding of opportunity -36]: Guiguzi - flying clamp chapter - prevention against killing and bait
數學知識:臺階-Nim遊戲—博弈論
Telecom Customer Churn Prediction challenge
Concise analysis of redis source code 11 - Main IO threads and redis 6.0 multi IO threads