Everything
 

SFR panel


This panel is used to display the contents of the SFR and change the SFR values (see "2.10.3 Display/change the SFR").

This panel appears only when connected to the debug tool.

Caution

The SFR that cause the microcontroller to operate when it is read is read-protected and therefore cannot be read ("?" is displayed in the value).
To read the value of read-protected SFR, select [Force Read Value] from the context menu.

Remark 1.

This panel can be zoomed in and out by in the tool bar, or by moving the mouse wheel forward or backward while holding down the [Ctrl] key.

Remark 2.

When the separator line of each area in this panel is double-clicked, the width of the area changes to the shortest possible size that can display the contents of the area.

Figure A.12

SFR Panel

 

This section describes the following.

[How to open]

-

From the [View] menu, select [SFR].

[Description of each area]

(1)

Search area

This area is used to search for the SFR name.

 

Specifies the character strings to search (case-insensitive).

You can either type character strings directly from the key board (up to 512 characters), or select one from the input history via the drop-down list (up to 10 items).

 

Searches up for the SFR name containing the string specified in the text box, and selects the SFR that is found.

 

Searches down for the SFR name containing the string specified in the text box, and selects the SFR that is found.

Remark 1.

A hidden SFR name being classified with a category can be searched (the category is opened and the SFR is selected).

Remark 2.

After typing character strings to search, to press the [Enter] key is the same function as clicking the button, and to press the [Shift] + [Enter] key is the same function as clicking the button.

(2)

[SFR] area

The types of SFR are classified as categories (folders), and a list of the respective SFR name is displayed.

The meanings of the icons are as follows:

 

Indicates that the SFR name belonging to this category is displayed. When you double-click on the icon, or click on the "-" mark, the category is closed and the SFR name is hidden.

Note that no categories exist by default. Perform Tree editing if you need a category.

 

Indicates that the SFR name belonging to this category is hidden. When you double-click on the icon, or click on the "+" mark, the category is opened and the SFR name is displayed.

Note that no categories exist by default. Perform Tree editing if you need a category.

 

Indicates the name of the SFR.

Remark

The category names are sorted in character code order by clicking on the header part of this area (the SFR names in the category are also similarly sorted).

 

This area is provided with the following functions.

(a)

Tree editing

The each SFR can be categorized (by folders) and displayed in the tree view.

To create a category, Click the button on the toolbar or select [Create Category] from the context menu after moving the caret to a SFR name to create a category, and then input a desired name from the keyboard (up to 1024 characters).

To delete a category, select the category then click the button on the toolbar or select [Delete] from the context menu. However, the categories that can be deleted are only the empty categories.

To rename the created category, select the category then do either one of the following.

-

Click the name again, then directly rename the category name.

-

Select the [Edit] menu >> [Rename], then directly rename the category name.

-

Press the [F2] key, then directly rename the category name.

 

By directly dragging and dropping the SFR in the created category, each SFR is displayed in the categorized tree view.

Also, the display order of the categories and the SFR names (upper or lower position) can be changed easily by drag and drop operation.

To clear and restore an edited category, click on the button on the toolbar or select [Clear customization] from the context menu.

Remark

SFRs are categorized according to their initial states in CS+ V8.07.00 and later versions. When customization is cleared, SFRs are classified in their default categories.

Caution 1.

Categories cannot be created within categories.

Caution 2.

SFRs cannot be added or deleted.

(b)

Registering a watch-expression

Variable names of C language, CPU registers, SFR, and assembler symbols can be registered in the Watch panel as watch-expressions.

See "2.10.6.1 Register a watch-expression" for details on how to operate it.

Remark 1.

When you have registered a watch-expression with a category as the object, all of SFR belonging to that category are registered as watch-expressions.

Remark 2.

A scope specification is automatically added to a registered watch-expression.

(3)

[Value] area

The value of SFR is displayed and changed.

The radix of a data value can be selected by the button on the toolbar or the context menu item. In addition, a display format adding the value in hexadecimal number constantly can also be selected as well.

The meanings of the marks and colors displayed as SFR values are as follows (character colors and background colors depend on the configuration in the [General - Font and Color] category of the Option dialog box):

Display Example (Default)

Description

 

Character color

Blue

The value of the SFR that the user is changing (press the [Enter] key to write to the target memory).

Background color

Standard color

 

Character color

Brown

The value of the SFR that has been changed because of the execution of a program

To reset the highlighting, select the button on the toolbar or [Reset Color] from the context menu.

Background color

Cream

 

Character color

Gray

The value of the SFR that is a read-protected objectNote

Background color

Standard color

Note

An SFR for which the microcontroller ends up being activated by a read operation is shown.
To read the value of read-protected SFR, select [Force Read Value] from the context menu.

Caution

The timing for acquiring the values differs in the case of a 1 byte/2 bytes SFR and that of 1 bit SFRs that have been allocated to a 1 byte/2 bytes SFR. Owing to this, there are also cases where the values differ even if the value of the same SFR is displayed.

Remark

The values are sorted in ascending order of the numerical values by clicking on the header part of this area.

 

This area is provided with the following functions.

(a)

Changing SFR values

To edit the SFR value, select the value to edit, then change the value directly from the keyboard after clicking again on it (press the [Esc] key to cancel the edit mode).

After you edit the value of the SFR, it is written to the register of the debug tool by pressing the [Enter] key, or moving the focus to outside the edit region.

See "2.10.3.4 Modify the SFR contents" for details on the method for changing the SFR value.

(b)

Saving the contents of the SFR

The Save As dialog box can be opened by selecting the [File] menu >> [Save SFR Data As...], and all the contents of the SFR can be saved in a text file (*.txt) or CSV file (*.csv).

See "2.10.3.6 Save the SFR contents" for details on the method for saving the contents of the SFR.

(4)

[Type (Byte Size)] area

The type information of each SFR is displayed in the following formats.

-

<Type of SFR> [<Access attribute> <All accessible sizes>](<Size>)

Access attribute

One of the following is displayed as the access attribute.

R

Read only

W

Write only

R/W

Read/Write

All accessible sizes

All accessible sizes are demarcated by a comma and listed in order of the smallest size in bit units.

Size

The size of the SFR is displayed.

It is displayed by supplying the unit, in byte units in the event that it can be displayed in byte units, and in bit units in the event that it can be displayed on in bit units.

Example 1.

"The case of "SFR [R/W 1.8] (1 byte)"
An SFR that is readable/writable and 1 bit accessible/8 bit accessible, and whose size is 1 byte

Example 2.

"The case of "SFR [R/W 1] (1 bit)"
An SFR that is readable/writable and 1 bit accessible, and whose size is 1 byte

Remark

The type information is sorted in the character code order by clicking on the header part of this area.

(5)

[Address] area

The address that each SFR is mapped is displayed (hexadecimal number notation fixing).

However, in the case of the bit register, it is displayed by providing a bit offset value like the following examples.

Example 1.

The case of "0xFF40"
This is allocated to the address "OxFF40"

Example 2.

The case of "0xFF40.4"
This is allocated to bit 4 of the address "0xFF40.4" (bit register)

Remark

The addresses are sorted in ascending order of numerical values by clicking on the header part of this area.

[Toolbar]

 

Acquires the latest data from the debug tool, and updates the contents of this panel.

Note that the values of read-protected SFR are not re-read.

This item is disabled during execution of a program.

 

Resets highlighting of the selected SFR whose value has been changed by executing a program.

Note that this item is disabled during execution of a program.

 

Adds a new category (folder). Directly input the category name in the text box.

There are no restrictions on the number of categories that can be created anew (however, it is not possible to create a category inside a category).

Note that this item is disabled during execution of a program.

 

Clears the user customization (creation of categories, changing orders, and changing notation).

 

Deletes the selected character string(s).

If an empty category is in a select state, its category is deleted (it is not possible to delete SFRs).

Notation

The following buttons to change the notation of a data value are displayed.

 

Hexadecimal

Displays the value of the selected item in hexadecimal number (default).

Signed Decimal

Displays the value of the selected item in signed decimal number.

Unsigned Decimal

Displays the value of the selected item in unsigned decimal number.

Octal

Displays the value of the selected item in octal number.

Binary

Displays the value of the selected item in binary number.

ASCII

Displays the value of the selected item in ASCII code.

 

Adds the value in hexadecimal number enclosing with "()" at the end of the value of the selected item.

[[File] menu (SFR panel-dedicated items)]

The following items are exclusive for the [File] menu in the SFR panel (other items are common to all the panels).

Note that all these items are disabled during execution of a program.

Save SFR Data

Overwrites the contents of this panel to the previously saved text file (*.txt)/CSV file (*.csv) (see "(b) Saving the contents of the SFR").

Note that when the file has never been saved or the file is write disabled, the same operation is applied as the selection in [Save SFR Data As...].

Save SFR Data As...

Opens the Save As dialog box to newly save the contents of this panel to the specified text file (*.txt)/CSV file (*.csv) (see "(b) Saving the contents of the SFR").

[[Edit] menu (SFR panel-dedicated items)]

The following items are exclusive for [Edit] menu in the SFR panel (all other items are disabled).

Cut

Deletes the selected character string(s) and copies them to the clipboard (it is not possible to cut SFRs/categories).

Copy

Copies the contents of the selected range to the clipboard as character string(s).

If the SFR(s)/category(s) are selected, copies them to the clipboard.

The copied item can be pasted to the Watch panel.

Paste

If texts are in editing, pastes the contents of the clipboard to the caret position (it is not possible to paste SFRs/categories).

Delete

Deletes the selected character string(s).

If an empty category is in a select state, its category is deleted (it is not possible to delete SFRs).

Select All

If texts are in editing, selects all the character strings.

If texts are not in editing, selects all the SFRs/categories.

Rename

Edits the name of the selected category.

Find...

Moves the focus to the text box in the Search area.

Move...

Opens the Go to the Location dialog box to move the caret to the specified SFR.

[Context menu]

Register to Watch1

Registers the selected SFR or category to the Watch panel (Watch1).

Refresh

Acquires the latest data from the debug tool, and updates the contents of this panel.

Note that the values of read-protected SFR are not re-read.

This item is disabled during execution of a program.

Force Read Value

Forcibly reads once the value of the read-protected SFR.

Move...

Opens the Go to the Location dialog box.

Create Category

Adds a new category (folder). Directly input the category name in the text box.

There are no restrictions on the number of categories that can be created anew (however, it is not possible to create a category inside a category).

Note that this item is disabled during execution of a program.

Clear customization

Clears the user customization (creation of categories, changing orders, and changing notation).

Copy

Copies the contents of the selected range to the clipboard as character string(s).

If the SFR(s)/category(s) are selected, copies them to the clipboard.

The copied item can be pasted to the Watch panel.

Delete

Deletes the selected character string(s).

If an empty category is in a select state, its category is deleted (it is not possible to delete SFRs).

Notation

The following cascade menus are displayed to specify the notation.

 

Hexadecimal number

Displays the value of the selected item in hexadecimal number (default).

Signed Decimal

Displays the value of the selected item in signed decimal number.

Unsigned decimal number

Displays the value of the selected item in unsigned decimal number.

Octal

Displays the value of the selected item in octal number.

Binary

Displays the value of the selected item in binary number.

ASCII

Displays the value of the selected item in ASCII code.

Include Hexadecimal Value

Adds the value in hexadecimal number enclosing with "()" at the end of the value of the selected item.

Reset Color

Resets highlighting of the selected SFR whose value has been changed by executing a program.