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

How to mask pin change inerrupt?

I am new to nrf52832. I am using pin change interrupt. I want to know that how to mask  pin change interrupt?

Thanks in Advance

Parents Reply Children
  • Hey,

    Here is what the documentation of the in_event_enable function says.

    /**
     * @brief Function for enabling sensing of a GPIOTE input pin.
     *
     * @details If the input pin is configured as high-accuracy pin, the function
     * enables an IN_EVENT. Otherwise, the function enables the GPIO sense mechanism.
     * Note that a PORT event is shared between multiple pins, therefore the
     * interrupt is always enabled.
     *
     * @param[in] pin       Pin.
     * @param[in] int_enable  True to enable the interrupt. Always valid for a high-accuracy pin.
     */

    Note that a PORT event is shared between multiple pins, therefore the interrupt is always enabled.

    @param[in] int_enable  True to enable the interrupt. Always valid for a high-accuracy pin.

    Maybe you can try using uninit before going to sleep and init it back again when the device wakes up.

    void nrf_drv_gpiote_in_uninit(nrf_drv_gpiote_pin_t pin);
    

  • thanks for quick response. i will check it using void nrf_drv_gpiote_in_uninit(nrf_drv_gpiote_pin_t pin)

Related