RM0432
MOSI
MISO
SCK
NSS
Four I/O pins are dedicated to SPI communication with external devices.
•
MISO: Master In / Slave Out data. In the general case, this pin is used to transmit data
in slave mode and receive data in master mode.
•
MOSI: Master Out / Slave In data. In the general case, this pin is used to transmit data
in master mode and receive data in slave mode.
•
SCK: Serial Clock output pin for SPI masters and input pin for SPI slaves.
•
NSS: Slave select pin. Depending on the SPI and NSS settings, this pin can be used to
either:
–
–
–
See
The SPI bus allows the communication between one master device and one or more slave
devices. The bus consists of at least two wires - one for the clock signal and the other for
synchronous data transfer. Other signals can be added depending on the data exchange
between SPI nodes and their slave select signal management.
52.4.2
Communications between one master and one slave
The SPI allows the MCU to communicate using different configurations, depending on the
device targeted and the application requirements. These configurations use 2 or 3 wires
(with software NSS management) or 3 or 4 wires (with hardware NSS management).
Communication is always initiated by the master.
Figure 530. SPI block diagram
Rx
FIFO
Shift register
Tx
FIFO
Baud rate
generator
select an individual slave device for communication
synchronize the data frame or
detect a conflict between multiple masters
Section 52.4.5: Slave select (NSS) pin management
Address and data bus
Read
RXONLY
CPOL
CPHA
DS[0:3]
Write
BIDIOE
RM0432 Rev 6
Serial peripheral interface (SPI)
CRC controller
CRCEN
CRCNEXT
CRCL
Communication
controller
BR[2:0]
Internal NSS
NSS
logic
for details.
MS30117V1
1861/2301
1893
Need help?
Do you have a question about the STM32L4+ Series and is the answer not in the manual?