Reading the Contents of Component Registers in PSoC® Creator™ - KBA85475

Version: *A

 

Question:

How do you read the contents of the component registers during a debug session?

 

Answer:

To access the component registers, you can find the address of the register in the generated source files under the cydevice_trm.h tab and produce that address in the Memory 1 window, as shown in Figure 1.

 

Figure 1. Accessing the Component Registers in the Memory Space

1.png

However, a simpler and more straightforward method is to use the component debug window. This allows you to track the values in the various component registers during an active debug session. The procedure is depicted in Figures 2–4. First, go to Debug > Windows > Components to instantiate the component debug window during an active debug session.

 

Figure 2. Instantiating the Component Debug Window during an Active Debug Session

2.png

 

Then, select the components whose register values are to be traced.

 

Figure 3. Selecting Components

3.png

 

The key registers of the component and their corresponding values will be displayed in the component debug window.

 

Figure 4. Key Registers and Corresponding Values

4.png