TM STM32Fxxx HAL Libraries  v1.0.0
Libraries for STM32Fxxx (F0, F4 and F7 series) devices based on HAL drivers from ST from Tilen Majerle

External interrupts library for STM32Fxxx devices - More...


 Library defines.
 Library Typedefs.
 Library Functions.

Detailed Description

External interrupts library for STM32Fxxx devices -

This library allows you to easy enable external interrupt on specific pin.

You only need to specify GPIOx, pin and interrupt trigger you want to use and you are ready to use. There are predefined function names that you use to handle this interrupts.

There are 16 external interrupts possible, GPIO lines 0 to 15. Each GPIO_PIN_x from all GPIOx is connected to one line. In other words, PC0, PA0, PB0, PJ0,... are all connected to line 0, and so on. But you can use only one pin for one line at a time. So only PA0 at one time, or PD0 or PC0, but one a time.

You can still use more lines at the same time. So let's say PA0 is line0 and PC13 is line13. This 2 interrupts can be used simultaneously without problems.

Handling interrupts

Next step is handling interrupts. There are 16 interrupt lines, but only 7 interrupt handlers. Lines0 to 4 have each own handler, then lines 5 to 9 have one common and lines 10 to 15 have one common.

I write these functions in my library and use my own to handle specific line for you for easly. Sometimes there is need for use default handler names in your own, but 2 functions with same name can not be used, so I made some settings.

If you open defines.h file and add any of lines below, you will disable handler line for interrupts. By default, all handlers for lines are enabled. Disabled then with adding lines below in defines.h file:

//These works for STM32F4xx and STM32F7xx series
//Disable EXTI0_IRQHandler function
//Disable EXTI1_IRQHandler function
//Disable EXTI2_IRQHandler function
//Disable EXTI3_IRQHandler function
//Disable EXTI4_IRQHandler function
//Disable EXTI9_5_IRQHandler function
//Disable EXTI15_10_IRQHandler function
//These works for STM32F0xx series
//Disable EXTI0_1_IRQHandler function
//Disable EXTI2_3_IRQHandler function
//Disable EXTI4_15_IRQHandler function

If you need higher priority for external interrupts in NVIC, add lines below in defines.h file and edit them

//Set custom NVIC priority
 Version 1.0
  - First release
 - STM32Fxxx HAL
 - defines.h
 - attributes.h