Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

softdevice and RADIO_IRQHandler

nrf 5sdk + s140 + 52833
I'm currently debugging the time-sharing operation feature for BLE and the private protocol. I've found that after I power on and initialize the SoftDevice, even if I execute nrf_sdh_disable_request, I'm unable to properly enter the RADIO_IRQHandler interrupt in the ESB program. Could it be that the protocol stack modifies the default entry point of the radio interrupt vector? I'm puzzled by this and would greatly appreciate your help.
Here's a clue: I tried using Timeslot, and within the Timeslot, I registered the ESB radio's interrupt function, as shown below. I found that the private protocol's interrupt function could then be entered normally.

nrf_radio_signal_callback_return_param_t * radio_callback(uint8_t signal_type)
{
    switch(signal_type)
    {
        case NRF_RADIO_CALLBACK_SIGNAL_TYPE_START:
            //Start of the timeslot - set up timer interrupt
            signal_callback_return_param.params.request.p_next = NULL;
            signal_callback_return_param.callback_action = NRF_RADIO_SIGNAL_CALLBACK_ACTION_NONE;
            
            NRF_TIMER0->INTENSET = TIMER_INTENSET_COMPARE0_Msk;
            NRF_TIMER0->CC[0] = m_slot_length - 1000;
            NVIC_EnableIRQ(TIMER0_IRQn); 
              
            time_slot_start_handler();
            
            //start_ts = timestamp_tick_get_kb();
            NRF_LOG_INFO("in timeslot!ts %d %d", start_ts, g_Silent_Ota_Info.silent_ota_firmware_status); 

            break;

        case NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO:
            signal_callback_return_param.params.request.p_next = NULL;
            signal_callback_return_param.callback_action = NRF_RADIO_SIGNAL_CALLBACK_ACTION_NONE;

            RADIO_IRQHandler();

            break;

        case NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0:
            //Timer interrupt - do graceful shutdown - schedule next timeslot
            
            if(!ble_connect_sta_get())
            {
                configure_next_event_normal();
                signal_callback_return_param.params.request.p_next = &m_timeslot_request;
                signal_callback_return_param.callback_action = NRF_RADIO_SIGNAL_CALLBACK_ACTION_REQUEST_AND_END;
            }
            else
            {
                signal_callback_return_param.params.request.p_next = NULL;
                signal_callback_return_param.callback_action = NRF_RADIO_SIGNAL_CALLBACK_ACTION_END;
            }

            time_slot_end_handler();
            //end_ts = timestamp_tick_get_kb();
            //NRF_LOG_INFO("in timeslot!ts %d, diff %d %d", end_ts, end_ts - start_ts, g_Silent_Ota_Info.silent_ota_firmware_status); //Toggle LED4
            break;
        case NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_SUCCEEDED:
            //No implementation needed
            break;
        case NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_FAILED:
            //Try scheduling a new timeslot
            configure_next_event_earliest();
            signal_callback_return_param.params.request.p_next = &m_timeslot_request;
            signal_callback_return_param.callback_action = NRF_RADIO_SIGNAL_CALLBACK_ACTION_REQUEST_AND_END;
            break;
        default:
            //No implementation needed
            break;
    }
    return (&signal_callback_return_param);
}
Related