
CMM-9304-V2.1
Bluetooth 4.2 / 5.0 compatible module
SPEC No.
CMM-9304-V2.1
BLE module
Revision
2.8
State
2017-11-13
C-MAX printed
2017-11-13
Version
English
Page
6 of 11
C-MAX
2.4
SPI Slave Operation
Start of the SPI transaction is as follows:
1. The SPI Master asserts CSN to '0',
2. Waits until RDY is at '1'
3. Sends 2 header bytes
4. Reads the status bytes STS1 and STS2.
The status byte STS1 on MISO indicates general status of device. The status byte STS2 on MISO
indicates buffer capacity and it depends on read or write transaction. In case of write transaction STS2
contains the number of bytes which can be written into Slave RX buffer. In case of read transaction
STS2 contains the number of bytes which can be read from Slave TX buffer.
After receiving header bytes (STS1 and STS2), the SPI Master knows how many bytes can be
transferred via SPI in the current transaction (read or write) and the rest of SPI transaction is standard.
The control byte (CTRL) sent on MOSI defines type of transaction (read or write). The second byte on
MOSI is dummy to align with read status data from the Slave and reads 0x00.
The type of transaction (read or write) in half duplex mode is defined by CTRL, the 1
st
byte sent by the
Master:
CTRL = 0x81 for a read transaction.
CTRL = 0x42 for a write transaction.
The STS1 byte contains the status of the SPI slave.
STS1 = 0xC0 when slave is ready.
The STS2 byte contains the maximum number of bytes which can be written into RX FIFO without RX
FIFO overflow during a write transaction, or the maximum number of bytes which can be read from TX
FIFO without TX FIFO underflow during a read transaction.
An SPI transaction can be terminated by the SPI Master at any time. The SPI Master can send only a
header in order to get the status of the RX/TX buffer and then stop the SPI transaction.