cancel
Showing results for 
Search instead for 
Did you mean: 

Why RXNE is automatically reset after write data to DR register, even I already set the FRXTH to 1

WM_IR
Senior

I have a problem where even I already set the FRXTH to 1, the RXNE will automatically RESET after the SPI write data to DR register.

I check using DEBUGGING MODE:

In main(), I already SET the FRXTH based on the reference manual below:

0693W00000AMAYMQA5.png 

Then, after I write the data into DR register, it SET the RXNE as below:

0693W00000AMTDXQA5.png 

But, after I execute the next instruction, which is not related to any SPI, Len-- to go out from the loop, my RXNE automatically RESET as below:

0693W00000AMTE1QAP.png 

This cause my code will hang at the SPI check flag status in the SPI ReceiveData.

Anyone knows what is the problem? or my SPI_senddata code is problem

1 ACCEPTED SOLUTION

Accepted Solutions

Debugger reading SPI_DR empties the FIFO, in the same way as when processor or DMA read it.

Debugging is intrusive.

JW

View solution in original post

2 REPLIES 2

Debugger reading SPI_DR empties the FIFO, in the same way as when processor or DMA read it.

Debugging is intrusive.

JW

WM_IR
Senior

ohh..I see, now it works! Thanks!