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

restricted peripheral access

Hi,

I want to access restricted peripheral: TIMER0. After small research found that I should use sd_ wrappers, in my case sd_nvic_SetPendingIRQ(TIMER0_IRQn) however I got always NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE error. How can I check if resource is currently used by softDevice? __sd_nvic_app_accessible_irq(TIMER0_IRQn) also gives always false.

Parents
  • Where is the above code running, and in which context? If you want to update the m_timeslot.in_timeslot variable to indicate is the timeslot is ongoing, you should not do it in the NRF_EVT_RADIO_SESSION_IDLE event.

    This event might appear to your application after the softdevice is active again, because the event is given on a lower priority. You should update the m_timeslot.in_timeslot variable in the callback function for the timeslot.

    Set it to True in NRF_RADIO_CALLBACK_SIGNAL_TYPE_START , and to false in NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0 (i assume that you have started a timer that times out before the timeslot is over).

Reply
  • Where is the above code running, and in which context? If you want to update the m_timeslot.in_timeslot variable to indicate is the timeslot is ongoing, you should not do it in the NRF_EVT_RADIO_SESSION_IDLE event.

    This event might appear to your application after the softdevice is active again, because the event is given on a lower priority. You should update the m_timeslot.in_timeslot variable in the callback function for the timeslot.

    Set it to True in NRF_RADIO_CALLBACK_SIGNAL_TYPE_START , and to false in NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0 (i assume that you have started a timer that times out before the timeslot is over).

Children
No Data
Related