This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

gpiote interrupt not taken

nRF51_SDK_9.0.0_2e23562 S310

/*
 * Setup the gpiote to handle pin events on the MMA8451Q INT1 pin. For the
 * accelerometer we want to detect high->low transitions in order to know
 * when accelerometer data is ready.
 */
static nrf_drv_gpiote_in_config_t m_INT1_pin_config =
{
    .is_watcher  = false,
    .hi_accuracy = true,
    .pull        = NRF_GPIO_PIN_NOPULL,
    .sense       = NRF_GPIOTE_POLARITY_HITOLO
};

There seems to be an issue around gpiote interrupts being lost when the pin config is set to low accuracy. This, I note, has been fixed in SDK 11.

We see an issue when the pin config is set to high accuracy.

I need a code sample for the workaround for this issue.

Parents
  • The issue is: the ISR does not run, inspection of the input pin by oscilloscope indicates that the interrupt input pin IS asserted.

    GPIOTE has 2 pins configured as follows:

    • MMA8451Q nRF51422


    • | | | |

    • | INT2 |-------->| P0.16 |

    • | | | |

    • | INT1 |-------->| P0.15 |

    • | | | |


    • Accelerometer IC Microcontroller IC

    GPIOTE Configuration is as follows

    /*

    • Setup the gpiote to handle pin events on the MMA8451Q INT1 pin. For the
    • accelerometer we want to detect high->low transitions in order to know
    • when accelerometer data is ready. */ static nrf_drv_gpiote_in_config_t m_INT1_pin_config = { .is_watcher = false, .hi_accuracy = true, .pull = NRF_GPIO_PIN_NOPULL, .sense = NRF_GPIOTE_POLARITY_HITOLO };

    /*

    • Setup the gpiote to handle pin events on the MMA8451Q INT2 pin. For the
    • accelerometer we want to detect high->low transitions in order to know
    • when the accelerometer has changed orientation e.g. from portrait to landscape. */ static nrf_drv_gpiote_in_config_t m_INT2_pin_config = { .is_watcher = false, .hi_accuracy = true, .pull = NRF_GPIO_PIN_NOPULL, .sense = NRF_GPIOTE_POLARITY_HITOLO };
Reply
  • The issue is: the ISR does not run, inspection of the input pin by oscilloscope indicates that the interrupt input pin IS asserted.

    GPIOTE has 2 pins configured as follows:

    • MMA8451Q nRF51422


    • | | | |

    • | INT2 |-------->| P0.16 |

    • | | | |

    • | INT1 |-------->| P0.15 |

    • | | | |


    • Accelerometer IC Microcontroller IC

    GPIOTE Configuration is as follows

    /*

    • Setup the gpiote to handle pin events on the MMA8451Q INT1 pin. For the
    • accelerometer we want to detect high->low transitions in order to know
    • when accelerometer data is ready. */ static nrf_drv_gpiote_in_config_t m_INT1_pin_config = { .is_watcher = false, .hi_accuracy = true, .pull = NRF_GPIO_PIN_NOPULL, .sense = NRF_GPIOTE_POLARITY_HITOLO };

    /*

    • Setup the gpiote to handle pin events on the MMA8451Q INT2 pin. For the
    • accelerometer we want to detect high->low transitions in order to know
    • when the accelerometer has changed orientation e.g. from portrait to landscape. */ static nrf_drv_gpiote_in_config_t m_INT2_pin_config = { .is_watcher = false, .hi_accuracy = true, .pull = NRF_GPIO_PIN_NOPULL, .sense = NRF_GPIOTE_POLARITY_HITOLO };
Children
No Data
Related