I am encountering an unusual behavior when I stop/start app_timers from the GPIOTE IRQ. I am implementing a debounce procedure from a GPIO interrupt .I find the timer callback is sometimes performed but not always. If I reconfigure the GPIOTE interrupt to be lower priority than the APP_TIMER_CONFIG_IRQ_PRIORITY the timer works as expected. If I configure the GPIOTE to be the same or higher priority than the RTC/APP_TIMER interrupt then the scheduler is sometimes not called. When it is not called, I find the timer is showing as active, but it does not appear to be in the linked list of timers.
Is there a requirement for app_timer_start/app_timer_stop functions to be called from a lower IRQ priority than the RTC / APP_TIMER IRQ priority?
We are using app_timer2.
This is with NRF5 SDK 17.0.2.