The SPI Protocol

The SPI (Serial Peripheral Interface) protocol has two roles called master and slave. The MCU is the SPI master and the module is the SPI slave.

With SPI, the MCU initiates all communications. When the module is initialized, the READY_N signal is asserted. It is recommended to wait for the READY_N signal before attempting to use SPI.

After initialization, every time the MCU sends a single-byte command to the module, the module returns a one-byte status in this format:

Bit 7 (MSB) 6 5 4 3 2 1 Bit 0 (LSB)
Invalid -

-

- ADS Busy Error Attention Busy
  • Bit 7: Invalid (must be zero) - status values from message start byte. MCU checks this bit. If set, ignores the rest of the status.

Helps detect bugs (for example, module sends all ones or MISO line is floating).

  • Bits 6 - 4: Reserved - MCU ignores these bits.
  • Bit 3: ADS Busy - if set, module cannot accept a data service operation.
  • Bit 0: Busy - module sets this after a command is recognized, and clears it on completion.

A new command must not be sent unless a non-Busy status is seen first. As soon as the new command starts, Busy status should be set.

Following are descriptions of single-byte commands, packet transfers, and error cases/recovery; click each to display the information:

 

 

 

 

 

Please click here to let us know how we're doing. Thank you.