Timeslot API + ESB depended on ble interval

Hi All,

I have this problem with using the ESB + Timeslot example from Github.

The interval of the ESB TX Transmit is depended on the advertisement interval I configure. How can I make the ESB interval faster like the switch between TX/RX between ESB. Now it only rechecks the TX queue after every new BLE event.


  • Hi

    The ESB timeslot library should try to get as much time as it can, regardless of the advertisement interval used.

    What is the advertising interval when you are seeing issues?

    Best regards

  • Hi, so I got a little further with this. So what I wanted to do was to rebuild the BLE Scanner/Broadcast system but than with ESB. Therefor I wanted RX and TX to interlace really quickly within one slot. Because in the Github the procedure is send all TX messages in buffer and than RX the rest of the timeslot. It doesn't keep checking TX messages as they come along into the buffer. This works fine when you have a small interval advertisement going on because the Softdevice will stop your timeslot and the ESB lib will request it again when needed. When you don't have any BLE advertisement going on the timeslots seem to last up to 10 seconds and than close and restart.

    So I was able to successfully make the interlacing feature by running the TIMESLOT_BEGIN function multiple times within a timeslot. But now I have the problem that I can't close the timeslot earlier than 10 seconds. I request the the session close with the following command:


    But this doesn't seem to impact the timing of when the session actually closes. So when the "NRF_EVT_RADIO_SESSION_CLOSED" event is called. Is there a way to close the timeslot immediately?

  • Hi

    Normally there is no need to close a timeslot early. You can always exit the interrupt if you like, or you could start a new run of the ESB routine.

    How do you measure the timeslots to be 10 seconds in length?
    According to the spec you shouldn't be able to get timeslots longer than 100ms, but I haven't tested it personally.

    Best regards

  • I measure the time between my initial time slot request till the NRF_EVT_RADIO_SESSION_CLOSED event. The reason why I want to close the timeslot early is to flash information to the persistent storage but this is now postponed till the NRF_EVT_RADIO_SESSION_CLOSED event is called.

  • Hi

    What library are you using for flash access?

    When you are in a timeslot you can access the flash controller (NVMC) directly, you don't have to request access through the SoftDevice, but you have to make sure the library you are using doesn't try to access the SoftDevice under the hood.

    For the fstorage library we have separate versions for use with or without a SoftDevice.

    Best regards