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

GPIOTE failing to trigger

This is a voltage drop of 3.3V to ~450mV before decaying.

I'm using P0.02 (AIN0) on the nRF52840 on a custom board. This is my config:

static nrfx_err_t gpiote_init(void) {
    nrfx_err_t err = nrfx_gpiote_init();
    if (err) return err;
    nrfx_gpiote_in_config_t config = NRFX_GPIOTE_CONFIG_IN_SENSE_HITOLO(true);
    config.pull = NRF_GPIO_PIN_PULLUP;
    err = nrfx_gpiote_in_init(STEPPER_DIAG0_PIN, &config, gpiote_evt_handler);
    return err;
}

My handler function is never being called.

When I check the status of the pin before and after the event (via nrfx_gpiote_in_is_set(STEPPER_DIAG0_PIN);) it returns as expected, so I'm quite confident it's not a connectivity problem.

The ADC isn't in use: #define NRFX_SAADC_ENABLED 0

Related