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

Timeslot question

Dear Nordic Engineers

I would like to sample the ADC between advertisements or connections, that is when the RF is sleeping, so I want to use Timeslot, I see there is a tutorial:devzone.nordicsemi.com/.../setting-up-the-timeslot-api

I refer to this example and make changes in the ble_app_template routine. I am using the 17.0.2 version of the SDK, so I have made a little modification. The modifications are as follows:
1.In "timeslot.c",replaced the header file "softdevice_handler.h" with "nrf_sdh.h".

2.As sys_evt_dispatch is not there in main.c,so I added the following line to main.c

3.I call NRF_SDH_SOC_OBSERVER(m_time_slot_soc_observer,0,time_slot_soc_evt_handler,NULL); in  ble_stack_init(void)

I download the program into the NRF52832 DK and opened LOG.I found that the timeslot is only executed one times. ,LED4 not blinking it stays on

This is my timeslot event handler function

I don't know why this happens,I would like Timeslot to turn on  every time the RF  sleeps.

Please give me some advices.

Best regards.

Related