Serial peripheral interface (SPI)
read operation to SPI_DR register (SPI_I2S_ReceiveData())
followed by a read operation to SPI_SR register
(SPI_I2S_GetFlagStatus()).
ï‚· MODF (Mode Fault) flag is cleared by software sequence: a
read/write operation to SPI_SR register
(SPI_I2S_GetFlagStatus()) followed by a write operation to
SPI_CR1 register (SPI_Cmd() to enable the SPI).
20.2.11.6 SPI_I2S_GetITStatus
ITStatus SPI_I2S_GetITStatus ( SPI_TypeDef * SPIx, uint8_t
SPI_I2S_IT)
Checks whether the specified SPI/I2S interrupt has occurred or
not.
ï‚· SPIx : To select the SPIx/I2Sx peripheral, where x can be: 1,
2 or 3 in SPI mode or 2 or 3 in I2S mode or I2Sxext for I2S full
duplex mode.
ï‚· SPI_I2S_IT : specifies the SPI interrupt source to check. This
parameter can be one of the following values:
ï€ SPI_I2S_IT_TXE : Transmit buffer empty interrupt.
ï€ SPI_I2S_IT_RXNE : Receive buffer not empty interrupt.
ï€ SPI_IT_MODF : Mode Fault interrupt.
ï€ SPI_I2S_IT_OVR : Overrun interrupt.
ï€ I2S_IT_UDR : Underrun interrupt.
ï€ SPI_I2S_IT_FRE : Format Error interrupt.
ï‚· The new state of SPI_I2S_IT (SET or RESET).
20.3 SPI Firmware driver defines
20.3.1 SPI
SPI
SPI_BaudRate_Prescaler
ï‚· #define: SPI_BaudRatePrescaler_2 ((uint16_t)0x0000)
ï‚· #define: SPI_BaudRatePrescaler_4 ((uint16_t)0x0008)