![NXP Semiconductors LPC29 Series Скачать руководство пользователя страница 258](http://html1.mh-extra.com/html/nxp-semiconductors/lpc29-series/lpc29-series_user-manual_1721826258.webp)
DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10316_0
© NXP B.V. 2008. All rights reserved.
User manual
Rev. 00.06 — 17 December 2008
258 of 571
NXP Semiconductors
UM10316
Chapter 18: LPC29xx SPI0/1/2
It is possible to temporarily suspend or skip one or more of the slaves in a transfer. To do
this the data in the transmit FIFO does not need to be flushed: during the transfer it is
skipped and nothing happens on the serial interface for the exact time that would have
been used by transferring to the skipped slave. In the receive FIFO dummy zero-filled
words are written, their number being equal to the number of words that would have been
received by the suspended slave. When suspending slaves it is important to keep the
corresponding SLVn_SETTINGS. The NUMBER_WORDS field is necessary to skip the
data for this slave and the other settings are needed to create the delay of the suspended
transfer on the serial interface. Suspending a slave does not change anything in the
duration of a sequential-slave transfer.
A slave can also be completely disabled. In this case the transmit FIFO may not hold any
data for this slave, which means the transmit FIFO may need to be flushed and
reprogrammed. The SLVn_SETTINGS for a disabled slave are ignored.
2.1.2 Slave mode
The SPI module can be used in slave mode by setting the MS_MODE bit in the
SPI_CONFIG register. The settings of the slave can be programmed in the
SLV0_SETTINGS registers that would correspond to slave 0 (offsets 02h4 and 028h).
Only slave 0 can be enabled by writing 01h to the SLV_ENABLE register and setting the
update_enable bit in the SPI_CONFIG register. A slave can only be programmed to be in
normal transmission mode.
3.
SPI register overview
The SPI registers are shown in
. These have an offset to the base address
SPI RegBase which can be found in the memory map, see
.
Fig 64. Sequential-slave mode: example
1
2
3
1
2
1
2
3
1
Transmit FIFO
Slave 1
Slave 2
Slave 3
Slave 4