cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to reset SPI RxFifo?

mmensch
Associate II
Posted on November 21, 2013 at 15:25

Hi,

I would like to ask if there is a way to clear the FRLVL and RXNE bits in SPIx->SR in order to ignore everything that has been received before.

I have some routines that only send data and other that will also receive and in these I have to loop through until RXNE is cleared. I would like to avoid this.

Thanks for any help

Martin

3 REPLIES 3
Posted on November 21, 2013 at 15:48

Try resetting the SPI peripheral through SPIxRST bits in the respective RCC_APByRSTR register.

JW
mmensch
Associate II
Posted on November 21, 2013 at 17:13

Hi Jan,

I thought about that too. But it will reset all my SPI settings which I would have to restore then.

Thanks anyway

Martin

Posted on November 21, 2013 at 18:06

Martin,

I guess you have no more options than these two - see description of SPI disable procedure in the RM.

JW