我可以配置为STM32F103ZE芯片上的GPIO引脚中断? [英] Can I configure an interrupt for a GPIO pin on a STM32F103ZE chip?

查看:1596
本文介绍了我可以配置为STM32F103ZE芯片上的GPIO引脚中断?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何GPIO中断供STM32F103ZE?
我通过数据表了,但没有发现任何有关这一点。
我是新来这个处理器,但最近使用TI的MSP430。
在MSP430我们可以配置使用一些GPIO寄存器中断。
谁能告诉我,我该怎么办呢?

Is there any GPIO interrupt available for STM32F103ZE? I went through the datasheet but didn't find anything related to that. I am new to this processor but recently used TI's MSP430. In MSP430 we can configure interrupts using some GPIO registers. Can anybody tell me how can I do that?

推荐答案

参看数据表

第8.1.3节规定:

所有端口都具有外部中断
  能力。要使用外部中断线路,端口必须
  在输入模式中配置。有关外部中断的更多信息,
  参考:

External interrupt/wakeup lines

All ports have external interrupt capability. To use external interrupt lines, the port must be configured in input mode. For more information on external interrupts, refer to:


      
  • 第9.2节:174页和外部中断/事件控制器(EXTI)

  •   
  • 第9.2.3节:第175页上的唤醒事件管理

  •   

如果你看看第9.2.5节,你会发现,你必须建立以要观察到正确的中断引脚映射外部中断外设(EXTI)。

If you check out section 9.2.5 you'll find that you have to set up the external interrupt peripheral (EXTI) in order to map the pins you want to observe into the correct interrupt.

重读第8和数据表9,并确定您了解每个EXTI寄存器如何需要设置为监听正确的GPIO线,并在正确的过渡类型触发。

Re-read sections 8 and 9 of the data sheet, and make certain you understand how each EXTI register needs to be setup to listen on the correct GPIO lines, and to trigger on the correct type of transition.

这篇关于我可以配置为STM32F103ZE芯片上的GPIO引脚中断?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆