Datasheet

Table Of Contents
Data Sheet ADuC7060/ADuC7061
Rev. D | Page 97 of 108
SPI REGISTERS
The following MMR registers control the SPI interface: SPISTA, SPIRX, SPITX, SPIDIV, and SPICON.
SPI Status Register
SPISTA Register
Name: SPISTA
Address: 0xFFFF0A00
Default value: 0x00000000
Access: Read only
Function: This 32-bit MMR contains the status of the SPI interface in both master and slave modes.
Table 107. SPISTA MMR Bit Designations
Bit Name Description
15:12
Reserved bits.
11
SPIREX SPI receive FIFO excess bytes present. This bit is set when there are more bytes in the receive FIFO than
indicated in the SPIMDE bits in SPICON.
This bit is cleared when the number of bytes in the FIFO is equal to or less than the number in SPIMDE.
10:8 SPIRXFSTA[2:0] SPI receive FIFO status bits.
[000] = receive FIFO is empty.
[001] = 1 valid byte in the FIFO.
[010] = 2 valid bytes in the FIFO.
[011] = 3 valid bytes in the FIFO.
[100] = 4 valid bytes in the FIFO.
7
SPIFOF SPI receive FIFO overflow status bit.
Set when the receive FIFO was already full when new data was loaded to the FIFO. This bit generates an
interrupt except when SPIRFLH is set in SPICON.
Cleared when the SPISTA register is read.
6
SPIRXIRQ SPI receive IRQ status bit.
Set when a receive interrupt occurs. This bit is set when SPITMDE in SPICON is cleared and the required
number of bytes has been received.
Cleared when the SPISTA register is read.
5 SPITXIRQ SPI transmit IRQ status bit.
Set when a transmit interrupt occurs. This bit is set when SPITMDE in SPICON is set and the required number
of bytes has been transmitted.
Cleared when the SPISTA register is read.
4
SPITXUF
SPI transmit FIFO underflow.
This bit is set when a transmit is initiated without any valid data in the transmit FIFO. This bit generates an
interrupt except when SPITFLH is set in SPICON.
Cleared when the SPISTA register is read.
3:1
SPITXFSTA[2:0] SPI transmit FIFO status bits.
[000] = transmit FIFO is empty.
[001] = 1 valid bytes in the FIFO.
[010] = 2 valid bytes in the FIFO.
[011] = 3 valid bytes in the FIFO.
[100] = 4 valid bytes in the FIFO.
0
SPIISTA SPI interrupt status bit.
Set to 1 when an SPI based interrupt occurs.
Cleared after reading SPISTA.