Timeslot API + ESB depended on ble interval

michaeld gravatar image

asked 2018-01-05 18:07:37 +0100

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.


edit retag flag offensive close delete report spam



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

Torbjørn Øvrebekk ( 2018-01-08 16:08:28 +0100 )editconvert to answer

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 ...(more)

michaeld ( 2018-01-09 15:42:50 +0100 )editconvert to answer


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

Torbjørn Øvrebekk ( 2018-01-11 15:23:47 +0100 )editconvert to answer

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.

michaeld ( 2018-01-11 16:06:47 +0100 )editconvert to answer

1 answer

Sort by » oldest newest most voted
ovrebekk gravatar image

answered 2018-01-12 13:34:37 +0100


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

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

User menu

    or sign up

Recent questions

Question Tools

1 follower


Asked: 2018-01-05 18:07:37 +0100

Seen: 76 times

Last updated: jan. 12