![Texas Instruments AM1808 Скачать руководство пользователя страница 1458](http://html.mh-extra.com/html/texas-instruments/am1808/am1808_technical-reference-manual_10945581458.webp)
Registers
1458
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Serial Peripheral Interface (SPI)
Table 29-22. SPI Buffer Register (SPIBUF) Field Descriptions (continued)
Bit
Field
Value
Description
29
TXFULL
Transmit data buffer full. This flag is a read-only flag. Writing into SPIDAT0 or SPIDAT1 field while
the TX shift register is full will automatically set the TXFULL flag. Once the data is copied to the
shift register, the TXFULL flag will be cleared. Writing to the SPIDAT0/SPIDAT1 register when
both TXBUF and the TX shift register are empty does not set the TXFULL flag.
0
The transmit buffer is empty; SPIDAT0/SPIDAT1 is ready to accept a new data.
1
The transmit buffer is full; SPIDAT0/SPIDAT1 is not ready to accept new data.
28
BITERR
Bit error. There was a mismatch of internal transmit data and transmitted data. The SPI samples
the signal of the transmit pin (master: SIMO, slave: SOMI) at the receive point (half clock cycle
after transmit point). If the sampled value differs from the transmitted value, a bit error is detected
and the flag BITERR is set. A possible reason for a bit error can be noise, a too-high bit
rate/capacitive load, or another master/slave trying to transmit at the same time.
Note:
This flag is cleared to 0 when RXDATA portion of the SPIBUF register is read.
0
No bit error occurred.
1
A bit error occurred.
27
DESYNC
Desynchronization of slave device. This bit is active in master mode only. The master monitors the
SPIx_ENA signal coming from the slave device and sets the DESYNC flag if SPIx_ENA is
deactivated before the last reception point or after the last bit is transmitted plus t
T2EDELAY
. If
DESYNCENA is set, an interrupt is asserted. Desynchronization can occur if a slave device
misses a clock edge coming from the master.
Note:
Possible inconsistency of DESYNC flag in SPI. Because of the nature of this error, under
some circumstances it is possible for a desync error detected for the previous buffer to be visible
in the current buffer. This is because the receive completion flag/interrupt will be generated when
the buffer transfer is completed. But desync will be detected after the buffer transfer is completed.
So, if CPU/DMA reads the received data quickly when an RXINT is detected, then the status flag
may not reflect the correct desync condition.
Note:
This flag is cleared to 0 when the RXDATA portion of the SPIBUF register is read.
0
No slave de-synchronization detected.
1
A slave device is desynchronized.
26
PARERR
Parity error. The calculated parity differs from received parity bit. If the parity generator is enabled
an even or odd parity bit is added at the end of a data word. During reception of the data word ,the
parity generator calculates the reference parity and compares it to the received parity bit. If a
mismatch is detected, the PARERR flag is set.
Note:
This flag is cleared to 0 when the RXDATA portion of the SPIBUF register is read.
0
No parity error detected.
1
A parity error occurred.
25
TIMEOUT
Time-out because of non-activation of SPIx_ENA pin. This bit is valid in master mode only. The
SPI generates a time-out because the slave hasn't responded in time by activating the SPIx_ENA
signal after the chip select signal has been activated. If a time-out condition is detected, the
corresponding chip select is deactivated immediately and the TIMEOUT flag is set.
Note:
This flag is cleared to 0 when RXDATA portion of the SPIBUF register is read.
0
No SPIx_ENA pin time-out occurred.
1
An SPIx_ENA signal time-out occurred.
24
DLENERR
Data length error flag.
Note:
This flag is cleared to 0 when the RXDATA portion of the SPIBUF register is read.
0
No data length error has occurred.
1
A data length error has occurred.
23-16
Reserved
0
Reads return zero and writes have no effect.
15-0
RXDATA
0-FFFFh
SPI receive data. This is the received data, transferred from the receive shift-register at the end of
a transfer completion. Irrespective of the programmed character length and the direction of
shifting, the received data is stored right-justified in the register.