SDK- nRF5_SDK_17.0.2_d674dde
SD - s112_nrf52_7.2.0
Hi Team,
I have configured a gpioTE and the Interrupt priority is set 6. (#define NRFX_GPIOTE_CONFIG_IRQ_PRIORITY 6 in sdk_config.h ).
I have a handler for BLE events. NRF_SDH_BLE_OBSERVER(m_ble_observer, APP_BLE_OBSERVER_PRIO, ble_evt_handler, NULL);
APP_BLE_OBSERVER_PRIO is set as 3.
from gpioTE handler I am sending a beacon and waiting for the response. But ble_evt_handler() is not getting called from gpioTE handler ?
I expect ble_evt_handler() to preempt gpioTE handler because the priority of ble_evt_handler() is 3(APP_BLE_OBSERVER_PRIO) and gpioTE is 6. Can you please explain me why the premeption is not happening ?
Here is the psuedcode
static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context) //priority3 as per my understanding{ ret_code_t err_code = NRF_SUCCESS;
switch (p_ble_evt->header.evt_id) { case BLE_GAP_EVT_ADV_SET_TERMINATED: adv_in_progress = 0; NRF_LOG_INFO("Advertising set terminated."); break; default: // No implementation needed. break; }}
gpioTE_handler() //priority 6
{
adv_in_progress = 1;
send_beacon();
while(adv_in_progress){ //not getting cleared
idle_state_handler();
}
}