I'm using SDK 15.2
I'm trying to read two separate events configure in two separate pins (PIN_1 and PIN_2) with two different handlers (handler_1 and handler_2), like this:
if (!nrf_drv_gpiote_is_init()) {
err_code = nrf_drv_gpiote_init();
}
APP_ERROR_CHECK(err_code);
nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_HITOLO(true);
in_config.pull = NRF_GPIO_PIN_PULLUP;
const auto err_code = nrf_drv_gpiote_in_init(PIN_1, &in_config, handler_1);
APP_ERROR_CHECK(err_code);
nrf_drv_gpiote_in_event_enable(PIN_1, true);
const auto err_code = nrf_drv_gpiote_in_init(PIN_2, &in_config, handler_2);
APP_ERROR_CHECK(err_code);
nrf_drv_gpiote_in_event_enable(PIN_2, true);
But in that way, only the event that was configured first works. In other words, if the event for PIN_1 is configured first it works, but just that event.
If event for PIN_2 is configured first it works, but just that event.
When I was debugging I've found out that nrfx_gpiote_irq_handler is not even called for the event that was configured last, so it might be some configuration problem
Am I missing something here?
Thanks!