Content originally posted in LPCWare by Ian Stroud on Tue Mar 22 05:41:43 MST 2011
I have a project running on the LPC1768 on lpcxpresso 3.6.2.
In trying to debug Timer0 interrupts I noticed that the reported values for MR0, MR1, MR2 and MR3 were not as I expected.
They should have been written as 101 (decimal) but were being displayed as 0x41.
I checked the assembler and the correct values were being written to Timer0 but the debug display was wrong.
I then, via the debugger, manually set one of the MR registers to 100. When I pressed enter the display shows 0x40, not 0x64 as I would expect. Curiously 64 as decimal is 0x40. Clearly I can't trust anything the debugger tells me about the contents of Timer 0.
Directly view the Timer via a memory pane shows the MR0-3 locations to have the correct values as programmed / manually entered it is just the Timer0 register display that gets them wrong.