Getting started with EXTI

Revision as of 14:37, 16 July 2020 by Registered User
Under construction.png Coming soon

This article explain what is and how to use EXTI through examplesl

1. External interrupt/event controller (EXTI)

The external interrupt/event controller consists of up to 23 edge detectors for generating event/interrupt requests. Each input line can be independently configured to select the type (interrupt or event) and the corresponding trigger event (rising or falling or both).

1.1. Configure EXTI to turn on LED when user button is pressed

1.1.1. Objective

  • Learn how to setup input pin with EXTI in CubeMX
  • How to Generate Code in CubeMX and use HAL functions

1.1.2. Goal

  • Configure GPIO and EXTI pin in CubeMX and Generate Code
  • Add into project Callback function and function which turn on led
  • Verify the correct functionality by pressing button which turns on LED

1.1.3. Create project in CubeMX

  • Menu > File > New Project
  • Select STM32F439ZITx

File:Select F439.png

  • Configure LED pin as GPIO_Output ( PG14 on NucleoF439ZI, for other board check User Manual)

File:LED UM.png File:LED PIN.png

  • Configure Button pin as GPIO_EXTIX (PA0 on NucleoF439ZI, for other board check User Manual)

File:Button.png