GPIO_EXTI

GPIO_EXTI block

This block implements GPIO EXTI interrupt global functionality.

Contents

GPIO_EXTI Block display

GPIO_EXTI Block parameters

  • Line – External Interrupt Line (from 0 to 15)
  • Port – port of pin EXTI use as External Interrupt Line
  • Select Edge – select External Interrupt Line Mode trigger detection

Explain outputs

  • Select Edge „Rising” – one output as function call rising edge trigger detected
  • Select Edge „”Falling” – one output as function call falling edge trigger deteced
  • Select Edge „Rising/Falling” – two outputs. First: function call rising or falling edge trigger detected. Second: „1”- rising edge trigger detected, „0”- falling edge trigger detected

CubeMX settings

  • Set GPIO PIN as GPIO_EXTIx
  • In GPIO Configuration set „GPIO mode” as EXTI Rising or Falling or Rising/Falling edge trigger detection
  • In NVIC Configuration -> NVIC table: set EXTI line x interrupt as Enabled
  • In NVIC Configuration -> NVIC table: set EXTI line x interrupt as Enabledand set Preemption and Sub Priority
  • In NVIC Configuration -> Code generation table: set EXTI line x interrupt to generate IRQ handler