2

I think I'm mixed up a bit in NVIC of stm32 MCUs. I took a look in the SPI.h of the STM32F10x standard peripheral library. I don't know that why while there is SPI_I2S_IT_RXNE for checking the status of recieved buffer we have SPI_I2S_FLAG_RXNE flag for this porpuse?

look:

figure1

Roh
  • 4,598
  • 6
  • 41
  • 86

1 Answers1

1

The SPI_I2S_FLAG* flags are used in polling mode, while SPI_I2S_IT* flags are for interrupt mode.

See here for more details: http://web.eece.maine.edu/~hummels/classes/ece486/docs/libperiph_doc/group__SPI__Group5.html

Armandas
  • 7,845
  • 1
  • 32
  • 56
  • 1
    AVR controller have something similar to this. If, for example, you are currently performing an ADC conversion then a flag will be set until the process is complete. However, an additional flag will be set once the conversion is complete to indicate an interrupt would have been triggered (if global interrupts were enabled). The interrupt *is* triggered of course if global interrupts were enabled. – sherrellbc Jul 26 '14 at 22:43