PKP
VS1000 P
ROGRAMMER
’
S
G
UIDE
VSMPG
16.3.3
Status SPIx_STATUS
SPIx_STATUS Bits
Name
Bits
Description
SPI_ST_RXFIFOFULL
7
Receiver FIFO register full
SPI_ST_TXFIFOFULL
6
Transmitter FIFO register full
SPI_ST_BREAK
5
Chip select deasserted mid-transfer
SPI_ST_RXORUN
4
Receiver overrun
SPI_ST_RXFULL
3
Receiver data register full
SPI_ST_TXFULL
2
Transmitter data register full
SPI_ST_TXRUNNING
1
Transmitter running
SPI_ST_TXURUN
0
Transmitter underrun
SPI_ST_BREAK is set in slave mode if chip select was deasserted in interrupted xCS
mode or a starting edge is encountered in xCS edge modes while a data transfer was in
progress. This bit has to be cleared manually.
SPI_ST_RXORUN is set if a received byte overwrites unread data when it is transferred
from the receiver shift register to the data register. This bit has to be cleared manually.
SPI_ST_RXFULL is set if there is unread data in the data register.
SPI_ST_TXFULL is set if the transmit data register is full.
SPI_ST_TXRUNNING is set if the transmitter shift register is in operation.
SPI_ST_TXURUN is set if an external data transfer has been initiated in slave mode
and the transmit data register has not been loaded with new data to shift out. This bit
has to be cleared manually.
Note: Because TX and RX status bits are implemented as separate entities, it is rela-
tively easy to make asynchronous software implementations, which do not have to wait
for an SPI cycle to finish.
16.3.4
Data SPIx_DATA
SPIx_DATA[SPI_CF_DLEN:0] may be written to whenever SPI_ST_TXFULL is clear. In
master mode, writing will initiate an SPI transaction cycle of SPI_1 bits. In
slave mode, data is output as soon as suitable external clocks are offered. Writing to
SPIx_DATA sets SPI_ST_TXFULL, which will again be cleared when the data word was
put to the shift register. If SPI_ST_TXRUNNING was clear when SPIx_DATA was written
to, data can immediately be transferred to the shift register and SPI_ST_TXFULL won’t
be set at all.
When SPI_ST_RXFULL is set, SPIx_DATA may be read. Bits SPI_CF_DLEN:0 contain
the received data. The rest of the 16 register bits are set to 0.
Rev. 0.20
2011-10-04
Page