![Digi S6B User Manual Download Page 35](http://html.mh-extra.com/html/digi/s6b/s6b_user-manual_2496668035.webp)
Operation
SPI communications
XBee Wi-Fi RF Module User Guide
35
You can configure the UART baud rate, parity, and stop bits settings on the device with the
BD
,
NB
,
and
SB
commands respectively. For more information, see
In the rare case that a device has been configured with the UART disabled, you can recover the device
to UART operation by holding DIN low at reset time. DIN forces a default configuration on the UART at
9600 baud and it brings the device up in Command mode on the UART port. You can then send the
appropriate commands to the device to configure it for UART operation. If those parameters are
written, the device comes up with the UART enabled on the next reset.
SPI communications
The XBee Wi-Fi RF Module supports SPI communications in slave mode. Slave mode receives the clock
signal and data from the master and returns data to the master. The following table shows the
signals that the SPI port uses on the device.
Signal
Function
SPI_MOSI (Master Out, Slave In)
Inputs serial data from the master
SPI_MISO (Master In, Slave Out)
Outputs serial data to the master
SPI_SCLK (Serial Clock)
Clocks data transfers on MOSI and MISO
SPI_SSEL (Slave Select)
Enables serial communication with the slave
SPI_ATTN (Attention)
Alerts the master that slave has data queued
to send. The XBee Wi-Fi RF Module asserts this
pin as soon as data is available to send to the
SPI master and it remains asserted until the
SPI master has clocked out all available data.
In this mode:
n
SPI clock rates up to 6 MHz are possible.
n
Data is most significant bit (MSB) first.
n
Frame Format mode 0 is used. This means CPOL= 0 (idle clock is low) and CPHA = 0 (data is
sampled on the clock’s leading edge).
n
The SPI port is set up for API mode and is equivalent to
AP
= 1.
The following diagram shows the frame format mode 0 for SPI communications.