0

I have an EFR32FG14 evaluation board with the example shown in the end. where it get triggered by an odd number of pins getting pressed. I want to change this example (in code) so i get the interrupt be triggered by a single pin ,not odd or even. I have looked inside the example and i see there two lines NVIC_EnableIRQ(GPIO_ODD_IRQn); GPIO_ODD_IRQn = 18, /*!< 16+18 EFR32 GPIO_ODD Interrupt */

Inside the GPIO_ODD_IRQHandle event handler called we have GPIO_IntClear(0xAAAA);

i want to enable interrupt only for PF7(not even or odd) and write an event handler for it. Is it possile?Thanks.

datasheet: https://www.silabs.com/documents/public/data-sheets/efr32fg14-datasheet.pdf user guide: https://www.silabs.com/documents/public/user-guides/ug318-brd4257b-user-guide.pdf

code example link: https://github.com/SiliconLabs/peripheral_examples/blob/master/series1/gpio/switch_led_interrupt/src/main_s1.c

I have learned the interrupt system,and ran close example to what i want shown in the post.

lub2354
  • 107
  • 2

1 Answers1

0

The interrupt numbers are fixed when the silicon chip is manufactured. You can't change them.

To have some action taken on PF7 only you could try to use the odd numbered pin interrupt, and then in the handler check which pin was signalled. If it wasn't PF7, then do nothing.

Tom V
  • 4,827
  • 2
  • 5
  • 22
  • Hello Tom,for Pin 7 i have a table of interrupt types with a unique number for each. I am using interrupt num 6 in my example ,what will happen if i use interupt number 2? What would change in the system? GPIO_ExtIntConfig(BSP_GPIO_PB0_PORT, BSP_GPIO_PB0_PIN,interrupt_num, 0, 1, true); Thanks. – lub2354 Feb 04 '23 at 19:35
  • Where is this table? Where do you define 6, what would you change to 2? – Tom V Feb 04 '23 at 20:02