Page 27 of 90
CCT24
GPIO port 4 can be alternately configured to provide a received message flag, referred to as SPI_RX_
AVL. Operation of this line is shown in Figure 2.14.3. Once the SPI_RX_AVL flag goes high, RX message
bytes can be clocked out on the MISO line by clocking 0x00 null bytes and/or transmit message bytes in
on the MOSI line. Note that nine to ten 0x00 null bytes will precede each received message, which is
always protocol formatted. Following the null bytes, the 0xFB start of message symbol will then be
clocked out, followed by the message length byte. The length byte can be used to confirm that all the
bytes in each received message have been clocked out. If a CCT24 slave is holding more than one
received message, the SPI_RX_AVL flag will remain high until all messages have been completely
clocked out.
In SPI slave mode, de-asserting and then asserting the /SS line resets the CCT24 SPI port on a byte
boundary. The /SS line can be toggled this way between every byte to assure bit streams into and out of
the SPI port remain byte framed. Less frequent /SS line toggling is also acceptable in most applications. It
is recommended that /SS be toggled at the start and end of each transmit message, and after every 256
null bytes when clocking to output a received message. The /SS line should also be toggled at the end of
each received message.
Figure 2.14.4 shows the signals a CCT24 uses in SPI Master mode. When periodic I/O reporting is ena-
bled on a CCT24 remote configured as an SPI Master, the remote will clock out a stored command string,
SPI_MasterCmdStr
, to collect data from a Slave peripheral each time the I/O report timer fires. The
collected data is then transmitted as a
TXData
message. Alternatively, a host connected to the base can
transmit an SPI command as a T
XData
message to the remote. The remote will clock the command into
its Slave peripheral and transmit back the Slave’s response, as show in Figure 2.14.5. In either case, the
command string and response string are limited to 32 bytes. Only data messages are routed through the
CCT24’s SPI port in Master mode. Command packets and command replies are routed through the
primary serial port. See Section 4.2.4 for additional SPI parameter details.