Development Flow
2.3.4Using Watch Windows
The
Assume that the variables to watch are defined in RAM, say:
RSEG DATA16_I
varword ds 2 ; two bytes per word varchar ds 1 ; one byte per character
In
1)Open the Watch Window:
2)Use
3)To watch varword, enter in the Expression box: (__data16 unsigned int *) #varword
4)To watch varchar, enter in the Expression box: (__data16 unsigned char *) #varchar
5)Press the Add Watch button
6)Close the Quick Watch window
7)For the created entry in the Watch Window, click on the + symbol. This will display the contents (or value) of the watched variable.
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
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
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
Although registers can be monitored in the Watch Window,