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

[NRF51822] SPI data loss during BTLE connection

Hi

SPI master is 3rd party MCU. SPI slave is nRF51822. If MCU sends a bunch of data to nRF51822 via SPI, at the same time, BTLE host like celluar phone try to connect nRF51822, is it possible to lost SPI data during the BTLE connection? If yes, did you have any suggestion to keep it from? Thanks.

  • Hi Jerrery,

    Have you experienced any issue with SPI slave and BLE stack ?

    The data rate of SPIS slave is limited at maximum 2Mbps and this will allow no collision between the radio and SPIS on accessing RAM using DMA .

  • Hi Hung, So, if SPIS is 2Mbps, no SPI data will be lost during BTLE connection? Can you provide SPIS example code of nRF51822 like SDK for evaluation? We had tried other BTLE IC. Transmit a bunch of data from SPI host to the BTLE IC. Then, the BTLE IC delivered data to celluar phone. We found 2% SPI data will be lost. The reason is BTLE has highest interrupt priority. During the BTLE interrupt, the coming SPI data will be possible to be ignored.

  • Hi Jeffery,

    The DMA controller (not the CPU) will handler both radio and SPIS for writing into RAM. By theory, there will be no data loss if the SPI slave speed is 2Mbps.

    To be honest, I haven't tested SPIS and BLE, and currently don't have an example to provide. However, in next version of the SDK, v5.0.0, which will be released very soon, we will provide library and example for SPIS.

    Update 9.10.2014 This thread might have additional information on the subject

Related