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

nRF51822 interrupt

Hi,

I just replaced the BLE chip in my board from CC2540 to nRF51822. I simply want to know how to configure the interrupt on a pin as well as rising/falling edge interrupts. I looked nrf_gpio.h and nrf_gpiote.h but neither was helpful. I know this is quite simple but couldn't find it myself. Can anyone please help me?

Thanks, Brian

Parents
  • Look at chapter 15 in the manual on GPIOTE. That lets you configure either an individual pin (one of 4) for interrupt with the IN event which generates the GPOTE interrupt, or it lets you configure the PORT event for multiple pins, you then read the pins afterwards in the GPIOTE interrupt handler and decide what to do.

    Note that depending on the version of the chip you have, the GPIOTE pin events (as opposed to the PORT event) keep the HF clock running and consume power. Rev 3 has that anomaly fixed.

  • @Brianbscho: I believe RK wanted to mention the nRF51 Series Reference Manual. You can find it here.

    I would suggest you to have a look at the pin_change_int example project in our NRF51 SDK to know how to configure the registers.

Reply Children
No Data
Related