- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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