当前位置:网站首页>External interrupt of stm32f4
External interrupt of stm32f4
2022-07-18 06:20:00 【Yiao】
Overview of external interrupts
stm32 Yes 22 External interrupts
EXTI Line 0~15: Corresponding to the outside IO The input of the port is interrupted .
EXTI Line 16: Connect to PVD Output .
EXTI Line 17: Connect to RTC Alarm clock event .
EXTI Line 18: Connect to USB OTG FS Wake Events .
EXTI Line 19: Wake up event connected to Ethernet .
EXTI Line 20: Connect to USB OTG HS( stay FS Middle configuration ) Wake Events .
EXTI Line 21: Connect to RTC Intrusion and timestamp Events .
EXTI Line 22: Connect to RTC Wake Events .
stm32f4 Each IO All ports can be used as the input of external interrupt , trunk 0 To 15 It can be used as IO Interrupt input of port , however IO There are more than 100 mouths , How will it be? IO Mouth and interrupt correspond one by one ? The following figure gives the answer :
Every break line , Same correspondence IO Serial number of port .
General configuration steps for external interrupts
SYSCFG_EXTILineConfig(EXTI_PortSourceGPIOA,EXTI_PinSource0);//PA0 Connect to the interrupt line 0
SYSCFG_EXTILineConfig(EXTI_PortSourceGPIOE,EXTI_PinSource2);//PE2 Connect to the interrupt line 2
SYSCFG_EXTILineConfig(EXTI_PortSourceGPIOE,EXTI_PinSource3);//PE3 Connect to the interrupt line 3
SYSCFG_EXTILineConfig(EXTI_PortSourceGPIOE,EXTI_PinSource4);//PE4 Connect to the interrupt line 4④ Initialize online interrupt , Set trigger conditions, etc .EXTI_Init();
EXTI_InitTtt.EXTI_Line =( Select the break line )
EXTI_Line0/1/2/3/4/5...../22
EXTI_InitTtt.EXTI_LineCmd=( Choose whether to enable )
DISABLE/ENABLE
EXTI_InitTtt.EXTI_Mode=( Select interrupt mode )
EXTI_Mode_Interrupt/EXTI_Mode_Event
EXTI_InitTtt.EXTI_Trigger=( Select trigger mode )
EXTI_Trigger_Rising
EXTI_Trigger_Falling
EXTI_Trigger_Rising_Falling// Trigger at any level
EXTI_Init(&EXTI_InitTtt);⑤ Configure interrupt grouping (NVIC), And can interrupt .NVIC_Init();
⑥ Write interrupt service function .EXTIx_IRQHandler();
⑦ Clears the interrupt flag bit EXTI_ClearITPendingBit();
边栏推荐
- R语言ggplot2可视化:使用ggpubr包的ggstripchart函数可视化分组点状条带图(dot strip plot)、设置position参数配置不同分组数据点的分离并且是抖动数据点
- R语言dplyr包summarise_all函数计算dataframe数据中所有数值数据列的均值和中位数、使用sapply筛选数值数据列(Summarize all Numeric Variables
- 【西南大学】考研初试复试资料分享
- 差距大?不同学历考生考研的要求和条件
- MQ Series 2: technology selection of Message Oriented Middleware
- 【森城市】GIS数据漫谈(四)— 坐标系统
- Is it safe for qiniu securities to open an account? Is it reliable?
- 仅需三步 轻松实现远程办公
- LocalDateTime格式化日期和@JsonFormat注解用法和@TableField(fill = FieldFill.INSERT)
- Loj#510-「LibreOJ NOI Round #1」北校门外的回忆【线段树】
猜你喜欢

Database daily question --- day 23: game play analysis L

Symbol数据类型

Notes on Linear Algebra 1

Treasure features new! Calendar view + card view are combined, and the work efficiency is fast to fly

迪文串口屏教程(3)

牛啊!2小时复现顶会论文,他的秘诀是——

Comment définir Notepad + + comme mode d'ouverture par défaut

MySQL CREATE TABLE statement error: 1103 incorrect table name

CS5801_ HDMI to EDP advantage replaces lt6711a solution

Where can I find the computer network speed detection
随机推荐
MySQL CREATE TABLE statement error: 1103 incorrect table name
Face the object
Diwen serial port screen tutorial (2)
@Use of equalsandhashcode annotation
Diwen serial port screen tutorial (3)
Function advanced application
2022年安全员-A证考试题目及在线模拟考试
如何在企业工作中应用知识管理,解决企业的问题?
【西南大学】考研初试复试资料分享
数据类型新用法与解构赋值
LeetCode 188. 买卖股票的最佳时机 IV***(double,need triple)
2022安全员-C证特种作业证考试题库及答案
MQ系列2:消息中间件的技术选型
Analysis of keepalive keeping alive mechanism of TCP protocol layer in IM development
差距大?不同学历考生考研的要求和条件
阿里内网疯传的P8“顶级”分布式架构手册被我拿到了
迪文串口屏教程(3)
@RequestBody
动画以及封装(offset、client、scroll系列)
裁员吵架散摊子, 马斯克:我太难了;狠心开源了一个舆情获取项目;取特征工程跟调参一样简单了?!NeRF大佬直呼卷不动了;前沿论文 | ShowMeAI资讯日报