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
  • Just so you can mark this as solved:

    If you don't have an external pullup, the solution is to set .pull to PULLUP. This way, the GPIOTE IN pin can have a defined state before high to low transition. If the initial value of the pin (which in your case is floating) is lower than a certain threshold (which I couldn't find at the moment), the transition will not be registered.

    Setting an internal pullup will result in a high to low transition of VCC->GND and will certainly be registeret as a valid transition.

Reply
  • Just so you can mark this as solved:

    If you don't have an external pullup, the solution is to set .pull to PULLUP. This way, the GPIOTE IN pin can have a defined state before high to low transition. If the initial value of the pin (which in your case is floating) is lower than a certain threshold (which I couldn't find at the moment), the transition will not be registered.

    Setting an internal pullup will result in a high to low transition of VCC->GND and will certainly be registeret as a valid transition.

Children
No Data
Related