Content originally posted in LPCWare by MikeSimmonds on Thu Oct 16 07:50:09 MST 2014
I have seen this and similar before. The reason [obvious in hindsight -- kicks self] is the the debugger
*has* to read the registers in order to display them.
With some peripherals (including the UARTS), reading, say, the received character buffer will
*immediately* change certain status bits and even IRQ pending flags perhaps even if the display does
not reflect this (due to the order in which the registers are read?).
Then, when your code continues, the staus bits, received character etc. have gone or been changed.
I had hoped that access to these and other registers by the on-chip debug circuitry would somehow
have special (magic) privillege so as not to alter the hardware state [because we want to observe
or verify, not change *anything*] but I seem (by observation) to be sadly dissappointed.
Anyway, that may answer your question.
HTH, Mike.