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.

Table 4-1. Master Mode TXR/RXR Settings
TXR = 1TXR = 0
RXR = 1

Full-Duplex (legacy) mode

If BMODE = 1, transfer when RXFIFO is not full and TXFIFO is not empty.

If BMODE = 0, transfer when RXFIFO is not full, TXFIFO is not empty and the transfer counter is non-zero.

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 = 1, transfer when TXFIFO is not empty.

If BMODE = 0, transfer when TXFIFO is not empty and the transfer counter is non-zero.

Received data is not stored.

No Transfers