Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
BrMa_1409086
Level 1
Level 1
First like received First like given

I have searched all over and cannot find a solid answer to this question. For example, using PSOC5LP and programming with PSOC Creator 4.0, when I enter debugging mode is there a way to watch the status of an input or output pin. For that matter, is there a way to watch the main port registers as defined in the pin header file. Assume an output pin is named "SO". The SO.h file contains a list of registers, such as Pin State, Data Register, etc. Is there a way to watch these values during debugging?

My current method is to simply Read the pin and update a global variable, but it seems like there should be a better way to do this. I am used to Code Composer Studio where you can look at all the port settings via drop-down menus and toggle GPIO values.

Thanks!

0 Likes
1 Solution

When you add a watchpoint, it is a variable watchpoint by default. Hence to set a watchpoint on a memory address you need to add a memory watchpoint.

To add a memory watchpoint:

Go to Debug > New Breakpoint > Memory Watchpoint

Then add the address you want to monitor and change "Break on" to Access instead of Write.

During debugging you can see the hit count of the Watchpoint increase on every access in the Breakpoints window.

In the memory window, type the specific address and then edit the corresponding values to toggle the value of the pin. Try it out and let us know your observations.

Regards,

Dheeraj

View solution in original post

0 Likes
7 Replies