Special Function Registers Window

Debug ›› Debug Windows ››
Parent Previous Next

winIDEA provides a specialized window (SFR window) to display CPU's on-chip special function registers.

SFR Window button

A SFR window is opened by selecting the 'Special Function Registers' command from the 'View' menu or by clicking the SFR Window button on 'View toolbar'.

The SFR window organizes CPU's registers hierarchically into two levels of groups (groups and sub-groups) and two levels of registers (registers and sub-registers). List of SFRs is determined by the CPU variant setting in the Emulation Options dialog:

A group is a collection of registers that serve a module on the CPU. If you are currently working on serial communication, you will see all involved registers by expanding the 'Serial Port' group.

When there area many (nearly) identical CPU modules, a group will contain a sub-group for every such module. In the figure below, the 'General Purpose Registers' group contains all 4 register bank sub-groups as well as the 'General Purpose Registers' sub-group, which duplicates registers of the currently active, register bank.

SFR Window showing 8031 CPU's registers

A register corresponds to a CPU's special function register. Along with the name, its current value is displayed.

Where a special function register contains fields of bits, it can be expanded to show these sub registers. In the above figure, the PCON register contains the SMOD sub-register.

Floating point SFRs are displayed in floating point format per default. Hexadecimal display can be selected via context menu.

1.The Name column displays the names of the (sub-)groups or (sub-)registers

2.The Value column displays values for (sub-)registers. If the value can't be read, appropriate message is displayed. In case that reading of this SFR was skipped due to refresh abort, 'skipped' is written instead of the value.You can disable refresh aborts in the SFR Options.

To modify register value, double click on its value. In the in-place edit field that opens enter the new value using the same number base as the register is displayed in.

Note: whenever possible, sub-registers are modified without writing the entire register (bit addressable registers). If a sub-register can not be accessed independently of its register, the register is first read, sub-register bits are adjusted, and the whole register is written back.

3.The Values column displays values and names of the register (if selected in the 'sub-register display' of the context menu).

For terminal registers or fields (those without sub-fields) the Values column displays a description of the current value.

Note: value description is available only if the SFR specification file provides it and if the current value fits one of the specified values for the field.

4.The Address column displays:

address for SFRs

bit position and size for sub-SFRs

5.The Description column displays a description of the peripheral group, register or a field.

Note: description is available only if the SFR specification file provides it.


Special Function Registers Window Context Menu

Custom SFR Windows