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

GPIOTE simultaneous interrupts

nRF52, SDK12.1, Eclipse, gcc 5.4.1, FreeRTOS, no soft-device.

I am having a problem with GPIOTE. I have six interrupts programmed on six 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.

Five of the interrupts are configured like so:

nrf_drv_gpiote_in_config_t config = GPIOTE_CONFIG_IN_SENSE_LOTOHI(false);
config.pull = NRF_GPIO_PIN_PULLDOWN;
ret_val = nrf_drv_gpiote_in_init(adxl_isr_pin[i], &config, adxl_event_handler);

The sixth interrupt is configured using NRF_GPIOTE_POLARITY_TOGGLE as it must interrupt on both edges. There are three different event handlers.

In this post is the following quote:

If power-consumption is not an issue and the signals may transition at the same time, then I would initialize the pins with nrf_drv_gpiote_in_init with a nrf_drv_gpiote_in_config_t struct where hi_accuracy is set to true and register a separate event handler for each of the pins.

This post implies that signals that transition simultaneously must use high accuracy. Is this true? If a GPIOTE event is configured for "low accuracy", can multiple simultaneous events be detected? Assuming that simultaneous events cannot be detected, is this restriction removed / eliminated if "high accuracy" is used? Why does this happen?

Parents
  • OK, lets keep FreeRTOS out of this as it seems it has nothing to do with the problem. The low accuracy thing says whether to use PORT interrupt or IN EVENTS interrupt. Since you are using low_accuracy, it uses port interrupts. It should not technically matter if one pin has changed or all pins has changes simultaneously to trigger the PORT event. I am not sure why GPIOTE stops responding in such a situation. I do not think that GPIOTE hardware have any problems, could be a driver issue. Can you upload your project so that i can reproduce your issue?

Reply
  • OK, lets keep FreeRTOS out of this as it seems it has nothing to do with the problem. The low accuracy thing says whether to use PORT interrupt or IN EVENTS interrupt. Since you are using low_accuracy, it uses port interrupts. It should not technically matter if one pin has changed or all pins has changes simultaneously to trigger the PORT event. I am not sure why GPIOTE stops responding in such a situation. I do not think that GPIOTE hardware have any problems, could be a driver issue. Can you upload your project so that i can reproduce your issue?

Children
No Data
Related