4 Master Mode
There are four different configurations for the SPI module while in Master mode that are selected by setting the TXR and RXR bits of the SPIxCON2 register. The four modes of operation available, while the SPI device is operating as a master, are illustrated in Table 4-1. There are typically three types of scenarios in a SPI data transaction:
- The master sends useful data and the slave sends useful data.
- The master sends useful data and the slave sends dummy data.
- The master sends dummy data and the slave sends useful data.
This SPI module allows the user to handle these different scenarios without software involvement by configuring the TXR and RXR pins of the SPI1xCON2 register accordingly.
TXR = 1 | TXR = 0 | |
---|---|---|
RXR = 1 |
Full-Duplex (legacy) mode If BMODE = If BMODE = |
Receive-Only mode Transfer when RxFIFO is not full and the transfer counter is non-zero. Transmitted data is either the top of the most-recently received data. |
RXR = 0 |
Transmit-Only mode If BMODE = If BMODE = Received data is not stored. | No Transfers |