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

51822 interrupt miss issue when sharing one GPIOTE

Hi expert,

I am developing 51822 under SDK 6.1, and we have one button and some sensors' interrupt lines as input GPIOs in our platform. In my code, after calling gpiote_init, I put button's handler and sensor interrup's handler into one app_button_cfg_t, like this:

static void buttons_init(void)
{
    static app_button_cfg_t buttons[] =
    {  
        {BOND_DELETE_ALL_BUTTON_ID, false, BUTTON_PULL, button_event_handler},
        {LIS3DSH_INT1_PIN, APP_BUTTON_ACTIVE_HIGH, BUTTON_PULL, sensor_event_handler},
    };
    
    APP_BUTTON_INIT(buttons, sizeof(buttons) / sizeof(buttons[0]), BUTTON_DETECTION_DELAY, true);
}

Seen from debugging O/P, i can see both work well. Sensor's interrup rate is 1Hz, button's push action is random. The issue is when I am pushing button quickly, I found some sensor's interrupt is miss-handled. Would you help me how to resolve this issue? Sensor data is exactly important for us, we dont like anyone is lost. The same to the button.

Thanks a lot!

Related