当前位置:网站首页>Stm32f030 external interrupt configuration
Stm32f030 external interrupt configuration
2022-07-18 09:36:00 【Little tiger_ IOT】
1、 explain
STM32F030 chip ,PC13 Trigger for external interrupt , Configuration of falling edge ;
Attention opening SYSCFG The clock ;
void back_key_init(void)
{
EXTI_InitTypeDef EXTI_InitStructure; //EXTIx Breakline configuration
NVIC_InitTypeDef NVIC_InitStructure; //EXTIx Interrupt vector configuration
pin_input_init(BACK_KEY); // Floating input , Schematic has been pulled up
// Configure the key pin as falling edge interrupt
RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG,ENABLE);
SYSCFG_EXTILineConfig(EXTI_PortSourceGPIOC,EXTI_PinSource13); // take EXTI13 Point to PC13
EXTI_InitStructure.EXTI_Line=EXTI_Line13;
EXTI_InitStructure.EXTI_Mode=EXTI_Mode_Interrupt;
EXTI_InitStructure.EXTI_Trigger=EXTI_Trigger_Falling;
EXTI_InitStructure.EXTI_LineCmd=ENABLE;
EXTI_Init(&EXTI_InitStructure);
NVIC_InitStructure.NVIC_IRQChannel=EXTI4_15_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPriority=0x01;
NVIC_InitStructure.NVIC_IRQChannelCmd=ENABLE;
NVIC_Init(&NVIC_InitStructure);
}
void EXTI4_15_IRQHandler(void){
if(EXTI_GetITStatus(EXTI_Line13)!=RESET){ // Judgment is EXTI_Line13
}
EXTI_ClearFlag(EXTI_Line13); // Clear the flag bit when exiting the interrupt
}边栏推荐
- Timeline and playable cause unity crash problem record
- 真实案例,大学生接单被骗,希望大家不要被骗了【惨痛教训】
- apache配置
- svg loading动画
- Tengshi's new luxury medium and large MPV is exposed, safe and comfortable
- Codeforces Global Round 21 C. Fishingprince Plays With Array
- Grow up Summer Challenge | learn / create from the boss, and get CSDN gift bag, exclusive certificate of honor, commemorative T-shirt and medal!
- Scripting rules and variable definitions
- 7-Redis架构设计到使用场景-缓存穿透、缓存雪崩、缓存预热、缓存降级
- Is it really safe for Huatai Securities to open an account?
猜你喜欢

Can SQL also play AI? you 're right! Mlops meetup V3 review openmlbd+sqlflow+byzer

Codeforces Round #806 (Div. 4) A - G

Leetcode-128-longest continuous sequence

Win11系统保护怎么关闭?Win11系统保护关闭方法
![In a real case, college students were cheated when taking orders. I hope you won't be cheated [painful lesson]](/img/7d/142e69d6da1899cefbcc99d7929fba.png)
In a real case, college students were cheated when taking orders. I hope you won't be cheated [painful lesson]

脚本编写规则和变量定义

Huawei Router: multi area OSPF protocol experiment

nacos win10单机启动命令

2022年上半年新晋独角兽40家,30%都被红杉中国投过了

Unity shader - cginclude file cginc
随机推荐
Codeforces Round #802 A. Optimal Path
君乐宝要IPO了,资本却笑不出来
LeetCode-83-删除链表中的重复元素
Idea导入jar包操作以及xml file配置文件
exness:原油止跌反弹,晚间关注美国恐怖数据表现
论文翻译解读:Translating Embeddings for Modeling Multi-relational Data【TransE】
Leetcode-162- find the peak value (two points must be seen)
构建数据基础制度,开启OID赛道新纪元
CSDN博客专家专属荣耀奖励来了
408天勤链表插入排序与双气泡排序课后习题代码
模拟卷Leetcode【普通】1823. 找出游戏的获胜者
apache配置
Opengauss cooperates with industry innovation to build a root community of open source databases
解决 vue 多层级路由 缓存失效 解决基于 keep-alive 的多级路由缓存问题 vue keep-alive 缓存失效 vue-element-admin多层级路由 缓存失效
idea 新建项目时克隆仓库代码
User login and registration function with verification code
liquibase初次使用
Flutter 模拟火箭发射动画
功能、模块质量和非功能性测试
internship:移动端源码的分析