Adding a register to the Expressions view in Studio

by <a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Hero Employee</font></font> </a> ChrisM on ‎09-12-2016 06:23 PM

Question

How do I add a register to the Expressions view in Studio?

Answer

There are two main methods to add a register to the "Expressions" view.  Drag and drop a register from the "Registers" view into the "Expressions" view, or manually type the group name and register name.

 

Drag and Drop Registers

 

In order to drag and drop registers from the "Registers" view to the "Expressions" view, you must first split the register view so that both are visible at the same time.  Then perform the following steps:

  1. Expand the registers view and find the desired register you wish to watch
  2. Drag the register or register group to a blank line in the "Expressions" view
    drag_registers_to_expressions.png
  3. Now Studio will display the value of the specified register
    expressions_register_view.png

Manually Add Register Watch Expression

 

Alternatively, a register group or register may be added using the GRP() and REG() macros.

 

To add the entire GPIO group to the "Expressions" view, add the following expression:
GRP(GPIO)

 

expressions_register_view_gpio_grp.png

 

To add the PE_DOUT register to the "Expressions" view, add the following expression:

GRP(GPIO).REG(PE_DOUT)

 

expressions_register_view.png