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

Closing the TimeSlot API in Observer Example

I'm using the Github project github.com/NordicSemiconducto... in order to SCAN in a specific channel rather than all 3 channels. I don't want to use the timeslot API continuously, and I want to be able to activate and deactivate it.

For deactivating it (in the specific observer example) is it just enough to use: sd_radio_session_close () and disable the two interrupts: SD_EVT_IRQn and SWI0_IRQn with sd_nvic_DisableIRQ.

Parents
  • do not disable SD_EVT_IRQn if there is parallel BLE activity from softdevice other than time_slot traffic.

    Yes, closing the session will disable time-slot session and you can also disable SWI0_IRQQn if not using it.

  • I know the issue of advertising might need another post, but I'm trying to figure out if this problem has anything to do with how I closed the radio session. My assumption was that as soon as I close the session, whatever program that I was running before can be run afterwards without any change. Off course, based on Hung Bui suggestion I changed the SD_EVT_IRQHnadler in the observer example to a combination of SYS_EVT_DISPATCH and a call to timeslot_sys_evt_handler. The observer example provides a nrf_adv_conn_init() function for advertising and by using that I was able to advertise. This function doesn't use SOFTDEVICE_HANDLER_INIT & softdevice_ble_evt_handler_set(ble_evt_dispatch). Both of these were used in Petter's example & Beacon application. So I'm not sure if these cause the problem or closing the session

Reply
  • I know the issue of advertising might need another post, but I'm trying to figure out if this problem has anything to do with how I closed the radio session. My assumption was that as soon as I close the session, whatever program that I was running before can be run afterwards without any change. Off course, based on Hung Bui suggestion I changed the SD_EVT_IRQHnadler in the observer example to a combination of SYS_EVT_DISPATCH and a call to timeslot_sys_evt_handler. The observer example provides a nrf_adv_conn_init() function for advertising and by using that I was able to advertise. This function doesn't use SOFTDEVICE_HANDLER_INIT & softdevice_ble_evt_handler_set(ble_evt_dispatch). Both of these were used in Petter's example & Beacon application. So I'm not sure if these cause the problem or closing the session

Children
No Data
Related