UM10850
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2016. All rights reserved.
User manual
Rev. 2.4 — 13 September 2016
350 of 464
NXP Semiconductors
UM10850
Chapter 24: LPC5410x System FIFO for Serial Peripherals
24.5.15.1 Receiver Timeout
A single 19-bit timeout timer is used for all receiver FIFOs. TimeoutBase chooses a bit of
that timer to be used as the place to begin comparing the timer to TimeoutValue, from bit 0
up to bit 15. The compare is always 4 bits in size. TimeoutValue can be any value from 2
to 15. This gives a maximum timeout range of 2 counts (too small to be useful) at the
bottom end, up to 15 * 32,786 (491,152) counts at the upper end. TimeoutValue of 0 and 1
should not be used. The timeout is enabled for each peripheral when the related interrupt
is enabled.
For instance, if TimeoutBase is set to 5, then 4 bits of the timeout timer starting at bit 5 are
compared to TimeoutValue. Since bit 5 changes every 32 counts of the timeout timer, the
maximum time for a timeout to occur (since the timer may change immediately after data
is entered into the FIFO) is TimeoutValue (a range of 2 to 15) * 32 clocks. The source of
the timeout clock is the watchdog oscillator with a nominal frequency of 500 kHz.
24.5.16 Status register for SPIs
The STATSPI register provides information about the current state of the SPI FIFOs. Each
SPI has a dedicated STATSPI register.
Table 400. Address map STATSPI[0:1] registers
Peripheral
Base address
Offset
Increment
Dimension
VFIFO
0x1C03 8000
[0x2004:0x2104]
0x100
2
Table 401. Status register for SPIn (STATSPI[0:1], address offset [0x2004:0x2104]) bit description
Bit
Symbol
Description
Reset
Value
0
RXTH
Receive FIFO Threshold. When 1, the receive FIFO threshold has been reached. This is a
read-only bit.
0
1
TXTH
Transmit FIFO Threshold. When 1, the transmit FIFO threshold has been reached. This is a
read-only bit.
0
3:2
-
Reserved. Read value is undefined, only zero should be written.
NA
4
RX
TIMEOUT
Receive FIFO Timeout. When 1, the receive FIFO has timed out, based on the timeout
configuration in the CFGSPI register. The timeout condition can be cleared by writing a 1 to this
bit, by enabling or disabling the timeout interrupt, or by writing a 1 to the timeout interrupt
enable.
0
6:5
-
Reserved. Read value is undefined, only zero should be written.
NA
7
BUSERR
Bus Error. When 1, a bus error has occurred while processing data for SPI. The bus error flag
can be cleared by writing a 1 to this bit.
0
8
RXEMPTY
Receive FIFO Empty. When 1, the receive FIFO is currently empty. This is a read-only bit.
1
9
TXEMPTY
Transmit FIFO Empty. When 1, the transmit FIFO is currently empty. This is a read-only bit.
1
15:10 -
Reserved. Read value is undefined, only zero should be written.
NA
23:16 RXCOUNT
Receive FIFO Count. Indicates how many entries may be read from the receive FIFO. 0 =
FIFO empty. This is a read-only field.
0
31:24 TXCOUNT
Transmit FIFO Count. Indicates how many entries may be written to the transmit FIFO. 0 =
FIFO full. This is a read-only field that is valid only when the TxFIFO is fully configured and
enabled.
0