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

what is the suitable parameter for length_us and distance_us in the TIMESLOT?

I use timeslot and BLE in my project.

m_slot_length    = 5000; //us 

 m_timeslot_request.request_type   = NRF_RADIO_REQ_TYPE_NORMAL;

 m_timeslot_request.params.normal.hfclk   = NRF_RADIO_HFCLK_CFG_DEFAULT;

 m_timeslot_request.params.normal.priority   = NRF_RADIO_PRIORITY_HIGH;

 m_timeslot_request.params.normal.length_us  = m_slot_length; // 100 us to 100 ms.

 m_timeslot_request.params.normal.distance_us = 50000; //max(128000000UL - 1UL)us 

                   
                                                                                                                                                                                      、

when I set length_us = 10000; distance_us = 100000.or length_us = 5000; distance_us = 70000.the timeslot will work normal normally. But when I set length_us = 10000; distance_us = 70000. or length_us = 5000; distance_us = 50000. the timeslot didn't work.function “m_radio_callback” could not be callback.And NRF_EVT_RADIO_BLOCKED will occur again and again.which is mean The last requested timeslot could not be scheduled, due to a collision with already scheduled activity or for other reasons.

what is the suitable parameter for length_us and distance_us in the TIMESLOT? we know that length_us is 100 us to 100 ms.And distance_us max value is 128000000.What causes the above problems?

I set the APP_ADV_INTERVAL 50ms,Is there a relationship between APP_ADV_INTERVAL and the two params?

Parents
  • Hello.

    The softdevice will periodically do work, whether you are in connection or just advertising. The interval of the work will be decided by the connection interval or advertisement interval.

    If you request a timeslot every 50 ms and have an advertisement interval of 50ms, there is a chance that every timeslot you request collides with the advertisement. Since you are using NRF_RADIO_REQ_TYPE_NORMAL and not NRF_RADIO_REQ_TYPE_EARLIEST, i assume that you need a fixed time in between all the timeslots? IF not, you can use the type NRF_RADIO_REQ_TYPE_EARLIEST to just get the next available timeslot.

    The shorter length you ask for, the more likely is it that your requested timeslot will be granted. You must analyze your timeslot task, and calculate or measure how long your timeslot should be. The length should not be longer than the adertisement interval or connection interval, because then there is never a slot big enough.

Reply
  • Hello.

    The softdevice will periodically do work, whether you are in connection or just advertising. The interval of the work will be decided by the connection interval or advertisement interval.

    If you request a timeslot every 50 ms and have an advertisement interval of 50ms, there is a chance that every timeslot you request collides with the advertisement. Since you are using NRF_RADIO_REQ_TYPE_NORMAL and not NRF_RADIO_REQ_TYPE_EARLIEST, i assume that you need a fixed time in between all the timeslots? IF not, you can use the type NRF_RADIO_REQ_TYPE_EARLIEST to just get the next available timeslot.

    The shorter length you ask for, the more likely is it that your requested timeslot will be granted. You must analyze your timeslot task, and calculate or measure how long your timeslot should be. The length should not be longer than the adertisement interval or connection interval, because then there is never a slot big enough.

Children
No Data
Related