Viewing Peripheral Registers with the onsemi IDE

The Peripheral Registers View Plugin

The onsemi IDE includes a peripheral register view plugin that enables you to visualize and modify all of the RSL15 registers during a debug session.

The following steps demonstrate how to use the Peripheral Registers View with the Blinky application:

  1. If you are not using a onsemi sample application, but one of your own instead, follow these steps to set the location of the system viewer description (SVD) file:
    1. Right click the program name, and choose Debug As > Debug Configuration.
    2. In the resulting window, choose GDB SEGGER J-Link Debugging.
    3. Click on the name of the application you are working with.
    4. In the SVD Path tab, fill in the File Path box with the following:
      ${cmsis_pack_root}/ONSemiconductor/RSL15/<version>/svd/rsl15.svd
      where <version> is the CMSIS-Pack version number, and click Debug. (See the "Changing the SVD Path" figure.)

Figure: Changing the SVD Path

  1. In the Debug perspective, when the application runs up to the first breakpoint in main, open the Peripherals window view by navigating to Window > Show View > Other > Debug > Peripherals and clicking to open. Now you can see all the RSL15 peripherals displayed.
  2. In the Peripherals window, select GPIO. Open the Memory window to monitor the RSL15 peripheral. Read only registers are highlighted in green. It is a good idea to drag your Memory window and place it side-by-side with your source code view (see the "Peripheral Registers View Perspective in Debug Session After Setting the SVD Path" figure) to prevent the console from switching focus away from the Memory window.

    Figure: Peripheral Registers View Perspective in Debug Session After Setting the SVD Path

  3. To see or change the GPIO register status, choose GPIO and expand the GPIO > GPIO_OUTPUT_DATA register in the Memory window.
  4. Add a breakpoint at this line of code:

    gpio->ToggleValue((GPIO_SEL_t)(SYSTICK_STATES_GPIO))

    To add the breakpoint, double-click to the left of the line number. A small circle appears there, indicating that a breakpoint has been set. This is shown in the "Breakpoint Added at a Line of Code" figure.

    Figure: Breakpoint Added at a Line of Code

    This breakpoint prevents the application from getting stuck in the main loop while you step through.

  5. Press F8 and observe that the register bits 8 and 10 toggle their state when gpio->ToggleValue((GPIO_SEL_t)(SYSTICK_STATES_GPIO)) and gpio->ToggleValue((GPIO_SEL_t)(TIMER0_STATES_GPIO)) are executed (in this case, from 0x400 to 0x100). The register turns yellow to indicate that you have activated real-time monitoring for it (see the "Toggling RSL15 GPIO Using the Peripheral Registers View: Before" figure).

    Figure: Toggling RSL15 GPIO Using the Peripheral Registers View: Before

  6. To manually change the register value, click on the Value field of the GPIO register to change the (HIGH/LOW) state of GPIO8 and GPIO10. The "Toggling RSL15 GPIO Using the Peripheral Registers View: After" figure illustrates the view after making the change. You can observe that the LED (GPIO8 and GPIO10) on your board changes state.

    Figure: Toggling RSL15 GPIO Using the Peripheral Registers View: After

The EmbSys Register View Plugin

The onsemi IDE includes an EmbSys Register View plugin for viewing RSL15 registers during a debug session. To set up the plugin before using it, perform the following steps:

  1. Make sure the latest version of the onsemi IDE is installed.
  2. In the IDE, choose Window > Preferences.
  3. Navigate in the left panel to select C/C++ > Debug > EmbSys Register View.
  4. In the drop-down menus for the following fields, make these selections, as shown in the "Setting up the EmbSys Register View Plugin" figure:
    • Architecture: SVD(CMSIS)
    • Vendor: ONSemiconductor
    • Chip: rsl15
  5. Click Apply and Close.

Figure: Setting up the EmbSys Register View Plugin

To open the plugin for viewing the registers, perform the following steps:

  1. In the IDE, choose Window > Show View > Other.
  2. Type EmbSys in the filter search.
  3. Select EmbSys Registers and click Open.

The EmbSys Registers View is now ready to be used during a debug session. Any register that needs monitoring must be marked in the plugin's window. To mark a register, double click on it; it turns green to that show it has been selected. Once marked, the register’s value appears in the view when a debug session has been suspended.

NOTE: To mark a group of registers at the same time, double click on the parent of a register group; this marks all its child registers for monitoring, as shown in the "Marking a Register Group for Monitoring" figure.

Figure: Marking a Register Group for Monitoring