Debugging PSoC4 "on the fly" ? | Cypress Semiconductor
Debugging PSoC4 "on the fly" ?
I've been working on a frequency counter project using PSoC4, and it is now nearing completion. It uses feedback via the code to keep the frequency locked to a target value. It is working quite well, but I'd like to be able to capture in detail what is going on when the code is correcting for frequency error.
Of course I can, and have, used the normal debug facilities to halt execution and display the current value of selected variables, but this is of little help in understanding the operation of a feedback loop.
What I really want is to capture some variable values on the fly without halting execution, or at least without causing too much execution delay. Given that an SWDIO/SWDCLK link is in place for debug, I feel that this should be possible. At the PC end the PSoC Creator program would need to capture values and write them to a file so that I could analyse them later. I would limit execution to a few hundred loops, so the file would not get too large.
I have done this kind of thing with other programs in the past, but running on the PC itself, just by inserting a Write to File command at required places in the code. So I am wondering if something similar would be possible with an external microprocessor.
Does anyone have suggestions or ideas on this?
Or perhaps it's just not possible ?
Thank you for any advice. Ken.