Using C-SPY
To change the format of the displayed variable (default, binary, octal, decimal, hex, char), select the type,
click the right mouse button, and then select the desired format. The value of the displayed variable can
be changed by selecting it, and then entering the new value.
In C, variables can be watched by selecting them and then dragging and dropping them into the Watch
Window.
Since the MSP430 peripherals are memory mapped, it is possible to extend the concept of watching
variables to watching peripherals. Be aware that there may be side effects when peripherals are read and
written by C-SPY (see FAQ Debugging #24 ).
CPU core registers can be specified for watching by preceding their name with '#' (i.e., #PC, #SR, #SP,
#R5, etc.).
Variables watched within the Watch Window are only updated when C-SPY gets control of the device (for
example, following a breakpoint hit, a single step, or a stop/escape).
Although registers can be monitored in the Watch Window, View → Register is the preferred method.
22 Development Flow SLAU138F – June 2004 – Revised March 2007
Submit Documentation Feedback