SWRU543B January 2019 – June 2025 CC3230S , CC3230SF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
This section describes the concept of a SPI transmission with the SPI mode0 and SPI mode2. In the transfer format with PHA = 0, SPIEN is activated a half-cycle of SPICLK ahead of the first SPICLK edge.
In both master and slave modes, SPI drives the data lines when SPIEN is asserted. Each data frame is transmitted starting with the MSB. At the extremity of both SPI data lines, the first bit of the SPI word is valid a half-cycle of SPICLK after the SPIEN assertion.
Thus, the first edge of the SPICLK line is used by the master to sample the first data bit sent by the slave. On the same edge, the first data bit sent by the master is sampled by the slave. On the next SPICLK edge, the received data bit is shifted into the shift register, and a new data bit is transmitted on the serial data line.
This process continues for a total number of pulses on the SPICLK line defined by the SPI word length programmed in the master device, with data being latched on odd-numbered edges and shifted on even-numbered edges.
Figure 8-4 is a timing diagram of a SPI transfer for the SPI mode0 and SPI mode2, when the SPI is master or slave, with the frequency of SPICLK equal to the frequency of CLKSPIREF.
Figure 8-4 Full-Duplex Single Transfer Format With PHA = 0In 3-pin mode without using the SPIEN signal, the controller provides the same waveform, with SPIEN forced to low state. In 3-pin slave mode, SPIEN is useless.