SWCU194 March 2023 CC1314R10 , CC1354P10 , CC1354R10 , CC2674P10 , CC2674R10
Figure 23-10 shows the MICROWIRE frame format for a single frame. Figure 23-11 shows the same format when back-to-back frames are transmitted.
MICROWIRE format is similar to SPI format, except that transmission is half-duplex and uses a master-slave message passing technique. Each serial transmission begins with an 8-bit control word that is transmitted from the SPI to the off-chip slave device. During this transmission, the SPI does not receive incoming data. After the message is sent, the off-chip slave decodes it and waits one serial clock after the last bit of the 8-bit control message is sent. The off-chip slave then responds with the required data. The returned data is 4 to 32 bits long, making the total frame length anywhere from 13 to 41 bits.
In this configuration, the following occurs during idle periods:
SPIn_CLK is forced low
SPIn_CS is forced high
The transmit data line SPIn_MOSI is typically forced low
Writing a control byte to the TX FIFO triggers a transmission. The falling edge of SPIn_CS transfers the value in the bottom entry of the TX FIFO to the serial shift register of the transmit logic and shifts the MSB of the 8-bit control frame out onto the SPIn_MOSI pin. SPIn_CS remains low for the duration of the frame transmission. The SPIn_MISO pin remains in the tri-state condition during this transmission.
The off-chip serial slave device latches each control bit into its serial shifter on each rising edge of SPIn_CLK. After the last bit is latched by the slave device, the control byte is decoded during a one clock wait state and the slave responds by transmitting data back to the SPI. Each bit is driven onto the SPIn_MISO line on the falling edge of SPIn_CLK. The SPI latches each bit on the rising edge of SPIn_CLK. At the end of the frame for single transfers, the SPIc_CS signal is pulled high one clock period after the last bit is latched in the receive serial shifter transferring the data to the RX FIFO.
The off-chip slave device can place the receive line in a tri-state condition either on the falling edge of SPIn_CLK (after the LSB has been latched by the receive shifter), or when the SPIn_CS pin goes high.
For continuous transfers, data transmission begins and ends like a single transfer, but the SPIn_CS line is held low and data transmits back-to-back. The control byte of the next frame follows the LSB of the received data from the current frame. After the LSB of the frame is latched into the SPI, each received value is transferred from the receive shifter on the falling edge of SPIn_CLK.
In the MICROWIRE mode, the SPI slave samples the first bit of receive data on the rising edge of SPIn_CLK after SPIn_CS has gone low. Masters driving a free-running SPIn_CLK must ensure that the SPIn_CS signal has sufficient setup and hold margins compared to the rising edge of SPIn_CLK.