Datasheet

SDEP (SPI Data Transport)
In order to facilitate switching between UART and SPI based Bluefruit LE modules, the
Bluefruit LE SPI Friend and Shield uses the same AT command set at the UART modules
( ATI , AT+HELP , etc.).
These text-based AT commands are encoded as binary messages using a simple binary
protocol we've named SDEP (Simple Data Exhange Protocol).
SDEP Overview
SDEP was designed as a
bus neutral
protocol to handle binary commands and responses --
including error responses -- in a standard, easy to extend manner. 'Bus neutral' means that
we can use SDEP regardless of the transport mechanism (USB HID, SPI, I2C, Wireless data
over the air, etc.).
All SDEP messages have a four byte header, and in the case of the Bluefruit LE modules up
to a 16 byte payloads. Larger messages are broken up into several 4+16 bytes message
chunks which are rebuilt at either end of the transport bus. The 20 byte limit (4 byte header +
16 byte payload) was chosen to take into account the maximum packet size in Bluetooth Low
Energy 4.0 (20 bytes per packet).
SPI Setup
While SDEP is bus neutral, in the case of the Bluefruit LE SPI Friend or Shield, an SPI
transport is used with the following constraints and assumptions, largely to take into account
the HW limitations of the nRF51822 system on chip:
SPI Hardware Requirements
The SPI clock should run <=4MHz
A 100us delay should be added between the moment that the CS line is asserted, and
before any data is transmitted on the SPI bus
The CS line must remain asserted for the entire packet, rather than toggling CS every
byte
The CS line can however be deasserted and then reasserted between individual SDEP
Most of the time, you never need to deal with SDEP directly, but we've documented
the protocol here in case you need understand the Bluefruit LE SPI interface in
depth!
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m0-bluefruit-le Page 197 of 238