nRF51822 sdk9.0
I am having a problem with GPIOTE. I have four interrupts programmed on four different pins.
As long as the signals do not transition at the same time, the firmware receives interrupts from all pins independently; everything works fine. However, if any two signals change simultaneously, the GPIOTE seems to stop responding altogether: no further interrupts are generated.
Four of the interrupts are configured :
nrf_drv_gpiote_in_config_t config_ppr = GPIOTE_CONFIG_IN_SENSE_TOGGLE(false);
config_ppr.pull = NRF_GPIO_PIN_PULLUP;
err_code = nrf_drv_gpiote_in_init(PIN_CHARGE_PPR, &config_ppr, gpiote_ppr_handler);
APP_ERROR_CHECK(err_code);
nrf_drv_gpiote_in_config_t config_chr = GPIOTE_CONFIG_IN_SENSE_TOGGLE(false);
config_chr.pull = NRF_GPIO_PIN_PULLUP;
err_code = nrf_drv_gpiote_in_init(PIN_CHARGE_CHG, &config_chr, gpiote_chr_handler);
APP_ERROR_CHECK(err_code);
(#define PIN_CHARGE_CHG 28
#define PIN_CHARGE_PPR 29)
nrf_drv_gpiote_in_config_t config_ppr = GPIOTE_CONFIG_IN_SENSE_TOGGLE(false);
config_ppr.sense = GPIOTE_CONFIG_POLARITY_LoToHi;
config_ppr.pull = GPIO_PIN_CNF_PULL_Pulldown;
err_code = nrf_drv_gpiote_in_init(OPT_CONFIG_EINT_PIN_NUMBER, &config_ppr, gpiote_bhi160_handler);
(OPT_CONFIG_EINT_PIN_NUMBER = 31)
nrf_drv_gpiote_in_config_t config_ppr = GPIOTE_CONFIG_IN_SENSE_TOGGLE(false);
config_ppr.pull = NRF_GPIO_PIN_PULLUP;
err_code = nrf_drv_gpiote_in_init(PIN_OPT_BUTTON, &config_ppr, gpiote_button_handler);
(PIN_OPT_BUTTON = 16)