Hi,
I'm trying to implement timeslot api in my app and have 2 questions:
- Referring to this article describing timeslot api, in step 8 the text says to add the timeslot's event handler to the system dispatcher.
As the article is based on SDK11 while my app using SDK15, I've tried to replace the instruction with the following:NRF_SDH_SOC_OBSERVER(m_timeslot_observer, 0, nrf_evt_signal_handler, NULL);
at the beginning of timeslot.c
However, it seem that my event handler is not triggered... (I've tried to force it to trigger by returning an invalid return code from the callback)
What is the correct way to 'hook' nrf_evt_signal_handler on current SDK ? - The app moves between two 'modes': active & idle.
Each time the app enters active mode, I call sd_radio_session_open() to create/re-open a session and
once the app moves to idle mode I call sd_radio_session_close().
On first cycle both work fine (err_code=0)
On next cycle when calling sd_radio_session_open() it generates NRF_ERROR_BUSY error as if the session was not closed properly even though it returned 0.
The documentation mentions that the session is closed only after NRF_EVT_RADIO_SESSION_CLOSED is fired, however per issue 1 above, I can not verify it did close.
My question is - how long it may take a session to close (I'm waiting 100s of ms at least) ? Are there any pre-requisites for closing a session ?
Are there other reasons for NRF_ERROR_BUSY upon opening a session other than session that was not closed properly ?
Many thanks for any advice