Figure 282. Rxne Behavior In Receive-Only Mode (Bidirmode=0 And Rxonly=1) In The Case Of - ST STM32F40 Series Reference Manual

Hide thumbs Also See for STM32F40 Series:
Table of Contents

Advertisement

Serial peripheral interface (SPI)

Figure 282. RXNE behavior in receive-only mode (BIDIRMODE=0 and RXONLY=1) in the case of

continuous transfers
Example with CPOL=1, CPHA=1, RXONLY=1
SCK
MISO/MOSI (in)
RXNE flag
Rx buffer
(read from SPI_DR)
Bidirectional receive procedure (BIDIMODE=1 and BIDIOE=0)
In this mode, the procedure is similar to the Receive-only mode procedure except that the
BIDIMODE bit has to be set and the BIDIOE bit cleared in the SPI_CR2 register before
enabling the SPI.
Continuous and discontinuous transfers
When transmitting data in master mode, if the software is fast enough to detect each rising
edge of TXE (or TXE interrupt) and to immediately write to the SPI_DR register before the
ongoing data transfer is complete, the communication is said to be continuous. In this case,
there is no discontinuity in the generation of the SPI clock between each data item and the
BSY bit is never cleared between each data transfer.
On the contrary, if the software is not fast enough, this can lead to some discontinuities in
the communication. In this case, the BSY bit is cleared between each data transmission
(see
Figure
In Master receive-only mode (RXONLY=1), the communication is always continuous and the
BSY flag is always read at 1.
In slave mode, the continuity of the communication is decided by the SPI master device. In
any case, even if the communication is continuous, the BSY flag goes low between each
transfer for a minimum duration of one SPI clock cycle (see
811/1422
DATA 1 = 0xA1
b0 b1 b2 b3 b4 b5 b6 b7 b0 b1 b2 b3 b4 b5 b6 b7 b0 b1 b2 b3 b4 b5 b6 b7
set by hardware
software waits until RXNE=1
and reads 0xA1 from SPI_DR
283).
Doc ID 018909 Rev 4
DATA 2 = 0xA2
cleared by software
0xA1
software waits until RXNE=1
and reads 0xA2 from SPI_DR
DATA 3 = 0xA3
0xA2
software waits until RXNE=1
and reads 0xA3 from SPI_DR
Figure
281).
RM0090
0xA3
ai17347

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

This manual is also suitable for:

Stm32f41 seriesStm32f42 seriesStm32f43 seriesRm0090

Table of Contents

Save PDF