Figure 348. Full-Duplex Single Master/ Single Slave Application - STMicroelectronics STM32WL5 Series Reference Manual

Advanced arm-based 32-bit mcus with sub-ghz radio solution
Table of Contents

Advertisement

RM0453
37.5.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.
Full-duplex communication
By default, the SPI is configured for full-duplex communication. In this configuration, the
shift registers of the master and slave are linked using two unidirectional lines between the
MOSI and the MISO pins. During SPI communication, data is shifted synchronously on the
SCK clock edges provided by the master. The master transmits the data to be sent to the
slave via the MOSI line and receives data from the slave via the MISO line. When the data
frame transfer is complete (all the bits are shifted) the information between the master and
slave is exchanged.
Rx shift register
1. The NSS pins can be used to provide a hardware control flow between master and slave. Optionally, the
pins can be left unused by the peripheral. Then the flow has to be handled internally for both master and
slave. For more details see
Half-duplex communication
The SPI can communicate in half-duplex mode by setting the BIDIMODE bit in the
SPIx_CR1 register. In this configuration, one single cross connection line is used to link the
shift registers of the master and slave together. During this communication, the data is
synchronously shifted between the shift registers on the SCK clock edge in the transfer
direction selected reciprocally by both master and slave with the BDIOE bit in their
SPIx_CR1 registers. In this configuration, the master's MISO pin and the slave's MOSI pin
are free for other application uses and act as GPIOs.
Serial peripheral interface / integrated interchip sound (SPI/I2S)

Figure 348. Full-duplex single master/ single slave application

Tx shift register
SPI clock
generator
Master
Section 37.5.5: Slave select (NSS) pin
MISO
MOSI
SCK
(1)
NSS
NSS
RM0453 Rev 5
MISO
Tx shift register
MOSI
Rx shift register
SCK
(1)
Slave
management.
MSv39623V1
1257/1450
1311

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32WL5 Series and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Stm32wl55 seriesStm32wl54 series

Table of Contents