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 packets (of up to 20 bytes
each).
The SPI commands must be setup to transmit MSB (most significant bit (https://adafru.it/pBP)) first (not LSB first)
IRQ Pin
The IRQ line is asserted by the Bluefruit LE SPI Friend/Shield as long as an entire SDEP packet is available in the buffer
on the nRF51822, at which point you should read the packet, keeping the CS line asserted for the entire transaction (as
detailed above).
The IRQ line will remain asserted as long as one or more packets are available, so the line may stay high after reading
a packet, meaning that more packets are still available in the FIFO on the SPI slave side.
SDEP Packet and SPI Error Identifier
Once CS has been asserted and the mandatory 100us delay has passed, a single byte should be read from the SPI bus
which will indicate the type of payload available on the nRF51822 (see Message Type Indicator below for more
information on SDEP message types). Keep CS asserted after this byte has been read in case you need to continue
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-32u4-bluefruit-le Page 154 of 211










