cancel
Showing results for 
Search instead for 
Did you mean: 

I am interfacing Spi Flash AT25SF041 with STM32f030RC . while Debugging, i checked that SPI_I2S_FLAG is not able to SET.

RSing.4
Associate

 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;

3 REPLIES 3
TDK
Guru

I don't see a question here. What flag are you checking for?

If you feel a post has answered your question, please click "Accept as Solution".
RSing.4
Associate

i am doing interfacing of external flash with stm32f030RC, when i am calling Erase function or write function, code is getting stuck in above loop.

Debugging may be intrusive. From RM:

Clearing the RXNE bit is performed by reading the SPIx_DR register.

JW