Status Flags - ST STM32F101 series Reference Manual

Advanced arm-based 32-bit mcus
Hide thumbs Also See for STM32F101 series:
Table of Contents

Advertisement

RM0008
Reception sequence
The operating mode is the same as for the transmission mode except for the point 1 (refer to
the procedure described in
set the master reception mode using the I2SCFG[1:0] bits in the SPI_I2SCFGR register.
Whatever the data length or the channel length, the audio data are received by 16-bit
packets. This means that each time the RX buffer is full, the RXNE flag in the SPI_SR
register is set and an interrupt is generated if the RXNEIE bit is set in the SPI_CR2 register.
Depending on the data length and channel length configuration, the audio value received for
a right or left channel may result from one or two receptions into the RX buffer.
The CHSIDE flag is updated each time data are received to be read from SPI_DR. It is
sensitive to the external WS line managed by the external master component.
Clearing the RXNE bit is performed by reading the SPI_DR register.
For more details about the read operations depending the I
to
Section 25.4.2: Supported audio
If data are received while the precedent received data have not yet been read, an overrun is
generated and the OVR flag is set. If the bit ERRIE is set in the SPI_CR2 register, an
interrupt is generated to indicate the error.
To switch off the I
the last RXNE = 1.
Note:
The external master components should have the capability of sending/receiving data in 16-
bit or 32-bit packets via an audio channel.
25.4.6

Status flags

Three status flags are provided for the application to fully monitor the state of the I
Busy flag (BSY)
The BSY flag is set and cleared by hardware (writing to this flag has no effect). It indicates
the state of the communication layer of the I
When BSY is set, it indicates that the I
master receive mode (I2SCFG = 11) where the BSY flag is kept low during reception.
The BSY flag is useful to detect the end of a transfer if the software needs to disable the I
This avoids corrupting the last transfer. For this, the procedure described below must be
strictly respected.
The BSY flag is set when a transfer starts, except when the I
The BSY flag is cleared:
when a transfer completes (except in master transmit mode, in which the
communication is supposed to be continuous)
when the I
When communication is continuous:
In master transmit mode, the BSY flag is kept high during all the transfers
In slave mode, the BSY flag goes low for one I
Note:
Do not use the BSY flag to handle each data transmission or reception. It is better to use the
TXE and RXNE flags instead.
Section 25.4.5: I2S slave
protocols.
2
S in reception mode, I2SE has to be cleared immediately after receiving
2
S is disabled
DocID13902 Rev 15
Serial peripheral interface (SPI)
mode), where the configuration should
2
S standard mode selected, refer
2
S.
2
S is busy communicating. There is one exception in
2
S clock cycle between each transfer
2
2
S is in master receiver mode.
S bus.
2
S.
730/1128
742

Advertisement

Table of Contents
loading

This manual is also suitable for:

Stm32f107 seriesStm32f102 seriesStm32f103 seriesStm32f105 seriesStm32f101 series

Table of Contents