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

nRF52: using SPI slave causing poor BLE throughput

I'm using the nRF52+SDK11.0.0+s132. I'm developing a system that streams BLE notifications to an Android app at ~53kbps (40B/6ms). I have the connection intervals set to 7.5ms. When the data is ready, I call sd_ble_gatts_hvx() twice with two 20B buffers. This runs fine by itself.

I also am developing the system to send the same data over the SPI slave peripheral to a master. The 40B data is written to the SPI slave TX buffer right after the the sd_ble_gatts_hvx() call. When I do this, the BLE analyzer shows that there are many connection events that do not have data to send, and the subsequent buffers get saturated with data, so data is missed and the throughput drops off terribly. What is causing this issue and how do I resolve it?

Screen shot of good throughput when the SPI slave is not active:

image description

Screen shot of poor throughput when the SPI slave is active: image description

Parents Reply Children
Related