This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to implement interrupt using GPIO (not GPIOTE) peripheral

Hi all,

I am trying to create a very simple program with GPIO peripheral (not GPIOTE) that toggles the state of an output pin through an interrupt handler, when an input pin is toggled (i.e button).

I have already seen the pin_change_int example that uses the GPIOTE peripheral to create an interrupt. But since this peripheral has 8 channels (correct?) and I need more that 10 inputs to trigger interrupt I thought  to use the GPIO peripheral because  In the nRF52840 datasheet (Chapter 6.9 page149) it says that GPIO peripheral features interrupt triggering on state changes on any pin.

I tried to implement the GPIO interrupt by adding the nrf_gpio.h in my main but there is no INTENSET register or some function for GPIO peripheral that I can use to create an interrupt.

So what am I doing wrong here?

Thank you

Parents Reply Children
No Data
Related