2021-04-25 10:07 PM
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:
Then, after I write the data into DR register, it SET the RXNE as below:
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:
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
Solved! Go to Solution.
2021-04-25 11:22 PM
Debugger reading SPI_DR empties the FIFO, in the same way as when processor or DMA read it.
Debugging is intrusive.
JW
2021-04-25 11:22 PM
Debugger reading SPI_DR empties the FIFO, in the same way as when processor or DMA read it.
Debugging is intrusive.
JW
2021-04-26 12:30 AM
ohh..I see, now it works! Thanks!