I am interfacing Spi Flash AT25SF041 with STM32f030RC . while Debugging, i checked that SPI_I2S_FLAG is not able to SET.
if ((SPIx->SR & SPI_I2S_FLAG) != (uint16_t)RESET) { /* SPI_I2S_FLAG is set */ bitstatus = SET; } else { /* SPI_I2S_FLAG is reset */ bitstatus = RESET; } /* Return the SPI_I2S_FLAG status */ return bitstatus;