25.5.6 Data

Name: DATA
Offset: 0x04
Reset: 0x00
Property: -

Bit 76543210 
 DATA[7:0] 
Access R/WR/WR/WR/WR/WR/WR/WR/W 
Reset 00000000 

Bits 7:0 – DATA[7:0] SPI Data

The DATA register is used for sending and receiving data. Writing to the register initiates the data transmission when in Master mode, while preparing data for sending in Slave mode. The byte written to the register shifts out on the SPI output line when a transaction is initiated.

The SPIn.DATA register is not a physical register. Depending on what mode is configured, it is mapped to other registers as described below.

  • Normal mode:
    • Writing the DATA register will write the shift register
    • Reading from DATA will read from the Receive Data register
  • Buffer mode:
    • Writing the DATA register will write to the Transmit Data Buffer register.
    • Reading from DATA will read from the Receive Data Buffer register. The contents of the Receive Data register will then be moved to the Receive Data Buffer register.