SPI debug on ST
While debugging the SPI on a ST32F303, it looks as if the debugger reads the SPI-DR data register, resulting in that the RXNE flag & FRLVL[] bits of the status register gets cleared. When my code inspect the SR to see if the next byte was recieved, it fails.
Is there a way to stop the debugger from reading the SPI-DR?
-
I'm not sure what you mean. If you mean that the debugger is reading the SR on it's own, I don't know why that would happen. Perhaps you could elaborate on the whole event from before to after the SR being read.
If you have the SR set as a watch variable, it will probably get read at unpredictable times. Otherwise, only your code would read that register.
Which debugger are you using? Do you have a code snippet?
Please sign in to leave a comment.
Comments
1 comment