开发者

Can I configure an interrupt for a GPIO pin on a STM32F103ZE chip?

开发者 https://www.devze.com 2023-03-25 11:01 出处:网络
Is there any GPIO interrupt available for STM32F103ZE? I went through the datasheet but didn\'t find anything related to that.

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?


Yes.

Please refer to the datasheet:

Section 8.1.3 states:

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:

  • Section 9.2: External interrupt/event controller (EXTI) on page 174 and
  • Section 9.2.3: Wakeup event management on page 175.

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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号