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

Disabling the GPIOTE interrupt using INTENCLR

Hi, I am using nrf52832 board. I was trying to disable the GPIOTE interrupt for a particular event (Event4) using INTENCLR register.  My code was NRF_GPIOTE->INTENCLR = 1 < < 4; But still the interrupt is not getting disabled. How to do the disabling actually?

  • Hi

    What does your interrupt handler look like?

    Could you try to clear the event in the disable interrupt functions, in addition to writing to the INTENCLR register?

    Like so:

    NRF_GPIOTE->INTENCLR = LOGIC_HIGH << EVENT5;
    NRF_GPIOTE->EVENTS_IN[5] = 0;

    Best regards
    Torbjørn

  • Hi, Can you help with the same problem

    I am enabling a interrupt using this code

            nrf_drv_gpiote_in_config_t gpiote_inConfig =
            {
                .sense           = senseTrnsiton,                         \
                .pull            = GPIO_PIN_CNF_PULL_Pullup,              \
                .is_watcher      = false,                                 \
                .hi_accuracy     = true,                                  \
                .skip_gpio_setup = false,                                 \
            };
            err_code = nrf_drv_gpiote_in_init(pin_number, &gpiote_inConfig, gpiote_drvInEventhandler);
            *gpiote_appInEventHandler[pin_number] = actionEvent;
            APP_ERROR_CHECK(err_code);
            nrf_drv_gpiote_in_event_enable(pin_number, true);

    and want to disable this event inside the event handler as soon as it triggers.

    I am calling this function to disable interrupt.

    nrf_drv_gpiote_in_event_disable(pin_number);
    

    But its not working. Please help.

  • Hi 

    Did you figure this out? 

    It is not recommended to re-open old cases like this, it is better to open a new devzone ticket.

    I have been on vacation for the last couple of weeks, and didn't notice it. 

    Best regards
    Torbjørn

Related