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

sd_radio_request maximum rate

I am working on an application where the nRF52832 is being used to control external hardware that requires fairly precise timing. Specifically, I use sd_radio_request to allocate timeslots of 1.2 mS each. During the allocated timeslot the timer peripherals are used to perform the timing of the specific hardware requirements. In normal use, a timeslot will be allocated with a second timeslot requested 4 mS later. The first timeslot is then reallocated at an interval after the first pair determing by a BLE characteristic value.

If I fake out the interval between timeslot pairs to cause timeslots to be allocated with 10 mS between pairs with no BLE device connected, the system performs at the selected 100 Hz rate. However, the moment I connect a BLE device, the rate immerdiately drops to 33.3 Hz (i.e. 30 mS between timeslot pairs.)

Am I running into a limit in how fast the Softdevice can allocate timeslots or is there something I can do to get faster timeslot allocation?

I just remembered to check the allocation time for the second timeslot in a pair relative to the first. When no BLE device is connected, the interval between the timeslots is 4 mS as expected. When a BLE device is connected, the interval between the timeslots in a pair goes up to 6 mS.

Parents
  • I should have explained what I meant by fake out. I added a call to one of my routines just before the mainline loop to cause the activity rtequesting the 100 Hz rate rather than having it commanded over the BLE.

    I have now changed the project so that a single timeslot of length 5.2 mS is requested with a reschedule intercal of 10 mS. This eliminates the jitter that was occurring between the two timeslots that act in pairs. I use a timer peripheral to do the scheduling withing the longer timeslot.

    The Softdevice I am using is s132 and the device is acting as a peripheral.

    The problem is now simpler to describe. When I start the device with no BLE connections I see the apprpriate actions once every 10 mS. However, the moment a device connects via BLE (in this case the connecting device is an iPod touch but that does not really matter) the activity we are generating drops back to once every 30 mS. The question then becomes is timeslot scheduling limited to once every 30 mS if there is a BLE connection?

Reply
  • I should have explained what I meant by fake out. I added a call to one of my routines just before the mainline loop to cause the activity rtequesting the 100 Hz rate rather than having it commanded over the BLE.

    I have now changed the project so that a single timeslot of length 5.2 mS is requested with a reschedule intercal of 10 mS. This eliminates the jitter that was occurring between the two timeslots that act in pairs. I use a timer peripheral to do the scheduling withing the longer timeslot.

    The Softdevice I am using is s132 and the device is acting as a peripheral.

    The problem is now simpler to describe. When I start the device with no BLE connections I see the apprpriate actions once every 10 mS. However, the moment a device connects via BLE (in this case the connecting device is an iPod touch but that does not really matter) the activity we are generating drops back to once every 30 mS. The question then becomes is timeslot scheduling limited to once every 30 mS if there is a BLE connection?

Children
No Data
Related