The register windows can show the values of both CPU registers and the processor’s special function or peripheral registers. Because microcontrollers are becoming very highly integrated, it’s not unusual for them to have hundreds of special function registers or peripheral registers, so CrossStudio provides four register windows. You can configure each register window to display one or more register groups for the processor being debugged.

## Register window user interface

The Registers window is divided into a tool bar and the main data display.

###### Register tool bar

Button | Description
| Displays the CPU, special function register, and periheral register groups.
| Displays the selected item in binary.
| Displays the selected item in octal.
| Displays the selected item in decimal.
| Displays the selected item in hexadecimal.
| Displays the selected item as a signed decimal.
| Displays the selected item as a character or Unicode character.
| Sets the displayed range in the active memory window to the where the selected item is stored.
| Sorts the registers alphabetically by name.
| Sorts the registers numerically by address or register number (default).

## Using the register window

Both CPU registers and special function registers are shown in the main part of the Registers window. When the program stops at a breakpoint or is stepped, the Register windows automatically update to show the current values of the registers. Items that have changed since they that were previously displayed are highlighted in red.

###### Showing the Registers window

To display register window n if it is hidden, do one of the following:

- From the View menu, click Other Windows then Registers n.

—or—

- From the Debug menu, click Debug Windows then Registers n.

—or—

- Type Ctrl+T, R, n.

—or—

- Right click the tool bar area to display the View menu.
- From the popup menu, click Other Windows then Registers n.

###### Displaying CPU registers

The values of the CPU registers displayed in the registers window depend up upon the selected context. The selected context can be:

- The register state the CPU stopped in.
- The register state when a function call occurred selected using the Call Stack window.
- The register state of the currently selected thread using the the Threads window.
- The register state that you have supplied using the Debug > Locate operation.

To display a group of CPU registers, do the following:

- On the Registers window tool bar, click the Groups button — .
- From the dropdown menu, check the register groups to display and uncheck the ones to hide.

You can uncheck all CPU register groups to allow more space in the display for special function or peripheral registers. So, for instance, you can have one register window showing the CPU registers and other register windows showing different peripheral registers.

###### Displaying special function or peripheral registers

The registers window shows the set of register groups that have been defined in the memory map file that the application was built with. If there is no memory map file associated with a project, the Registers window will show only the CPU registers.

To display a special function or peripheral register, do the following:

- On the Registers window tool bar, click the Groups button — .
- From the dropdown menu, check the register groups to display and uncheck the ones to hide.

###### Changing display format

When you select a register in the main part of the display, the display format button highlighted on the Registers window tool bar changes to show the item’s display format.

To change the display format of a register, do one of the following:

- Right click the item to change.
- From the popup menu, select the format to display the item in.

—or—

- Click the item to change.
- On the Registers window tool bar, select the format to display the item in.

###### Modifying register values

To modify the value of a register, do one of the following:

- Click the value of the register to modify.
- Enter the new value for the register. Prefix hexadecimal numbers with ‘0x’, binary numbers with ‘0b’, and octal numbers with ‘0’.

—or—

- Right click the value of the register to modify.
- From the popup menu, select one of the operations to modify the register value.

Modifying the saved register value of a function or thread may not be supported.