HAL library 04- EXTI for STM32Fxxx

EXTI library is used to set GPIO pin as external interrupt. It is designed to easily enable/disable interrupt and handle irq requests.

If you don’t know how EXTI works on STM32F4 or STM32F7 lines, you should take a look here.

Library

Read more about new HAL libraries

Features

  • Allows up to 16 external interrupts at a time
  • Allows to setup rising or falling edge for pin
  • Allows to disable interrupt
  • Single function for interrupt handling
  • Works for STM32F0, STM32F4 and STM32F7 series

Dependencies

  • HAL
  • TM
    • STM32Fxxx HAL
    • defines.h
    • GPIO

Library interrupt handling

STM32F4/7 has 7 interrupt handler function. They are all implemented in my library and all handlers calls one function, which is single callback function for different EXTI lines. On bottom example you will be able to see how to handle interrupts with single function.

For STM32F0, there are 3 interrupt handlers. They are also implemented in my library and all of them calls one function. Check example on the bottom.

Functions and enumerations

Example

Project is available on my Github account, download all libraries below.

tilz0R

Owner of this site. Application engineer, currently employed by STMicroelectronics. Exploring latest technologies and owner of different libraries posted on Github.

You may also like...