Other Parts Discussed in Thread: CC2541, ADS1299
Hi,
I am attempting to interface a CC2541 with the ADS1299 module, and I'd like to maximize the bandwidth I can achieve using the CC2541 BLE software stack V1.4 in order to achieve higher sample rates. I am using an iPhone 6 running iOS 8.1.2 to connect to my device. In my current configuration, my data packet consists of
(6 channels x 3 bytes per channel) + (1 byte timestamp) = 19 bytes
I use the osal_GetSystemClock() function to get the time in ms and send this as the timestamp byte.
Using the OSAL timer, I sample the ADS1299 every 10 ms and update the data characteristic, which has notifications enabled. With the iOS default connection interval of 30 ms, I can reliably achieve 3 notifications per connection event.
This results in successfully sampling 6 channels at 1 / (10 ms) = 100 Hz, and streaming data at (19 bytes / 10 ms) = 1900 bytes/second.
If possible, I would like to increase my sampling rate to 200 or 400 Hz. Specs and literature I've found online suggest that I am not reaching the full potential of my data bandwidth for BLE. For example, the forum post below indicates that I should be able to achieve 4 notifications per connection event. However, when I decrease my sampling period to 7 ms or 6 ms, the BLE Packet Sniffer shows I am still only getting 3 notifications per connection event (in addition to sample times which are not consistently 6 or 7 ms apart).
Using connection update requests, I have been able to decrease the connection interval to 20 ms or even 18.75 ms (though not reliably). However, at these lower connection intervals and while keeping my sampling period the same (10 ms), I find that the samples are not reliably 10 ms apart. This makes me wonder whether expiration of the 10 ms timer and sampling of the ADS1299 is overlapping with other processes running on the CC2541 (e.g., BLE connection processes, etc.).
For my particular project, I have a constraint on the time between samples. Once the data has been sent over BLE, I am applying digital filters to the data, which requires data sampled at constant intervals. Increasing throughput with varying time between samples (e.g., sometimes 10 ms then 11 ms or 9 ms) would not be useful for my particular application.
Any help would be greatly appreciated. I would just like to know whether or not I have reached the limit of BLE or whether I can make any improvements to increase my sample rate.
Thank you!