SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
As described on Message Types in CC31xx Host Interface, the communication between the host and the CC3100 device is comprised of several types of messages:
Figure 25-8 describes the flow of a command from the host to the device, along with the command complete indication from the device to the host (covering 1 and 2 in the list above).
As seen in Figure 25-8, when the host writes to the device, the data from the device on the MISO line should be disregarded by the host, and vice versa – when the host reads from the device, the data on the MOSI line is disregarded by the CC31XX device. TI recommends keeping the data to the device as all 0xFFs when reading from it.
The communication starts with the host sending the write SYNC word (for information regarding the SYNC words, see Synchronization words in CC31xx Host Interface), followed by header information, and then payload, when applicable. When the command has been analyzed by the device, it asserts the IRQ interrupt line. The host then writes the read SYNC word. The device clears the interrupt line and prepares the response. The host then reads continuously until the D2H SYNC pattern is detected. All data until that point is discarded. The SYNC word is then followed by headers and then payload, when applicable.
A data write sequence (#3 in the list above) looks like a subset of a command sequence, consisting of the host write alone (data write does not get acknowledged by the device).
An asynchronous event from the device to the host (item 4 in the list above) is also a subset of the command sequence, starting from an asynchronous interrupt from the device to the host.