Can you please mention the MPN of PSoC, is it CY8C3172 only.I can't find any PSoC family device starting with CY8C3172.
Is this issue project specific, then please share the project.
Please make sure that the 5 pins SWD pins connection is proper with MiniProg3.
Are you using any custom board, then please share the schematic if possible.
You can check the hardware Design guide too for PSoC3 to avoid any hardware related issue:
It is a CCG3PA device. I had the part number wrong. CYPD3171-24LQXQ . It is not project dependent. The connection are correct. The CCGPA can be programmed without any issues and the device runs properly. It is only when trying to debug that it dissconnects.
Is the debugger disconnecting when you try to reset or rebuild?
Also make sure PSoC programmer utility is not running when debugging in PSoC Creator.
Hardware used: Cypress CY4532 EVK
Project/Firmware used: CYPD3171-24LQXQ_cla01
Since the project comes with a bootloadable component, after building and programming, I just use “Attach to Target” with “Halt target on attach” option with the Miniprog3 debugger.
Answers to Cypress’ questions:
A1. After attaching to target (halted), the Disassembly tab opens. if I press on the “Reset” or “Rebuild” option, both disconnects me. The error is:
Debugger exited unexpectedly during run. Encountered error (Target disconnected See output window for more information.)
There was an unhanded error during the debug session. This has forced the debugger to shutdown. Try again.
If I press “Play”, nothing appears to happen.
A2: PSoC Programmer Utility is not opened.
I don’t believe my Miniprog3 debugger is completely broken because if I create a blank/scratch project in the PSoC4/CCGPA3 family, I can write some basic code and the debugger runs. I can see my simple code running and I can read my variable values in the “Watch” window.
There seems to be some components in the “CYPD3171-24LQXQ_cla01” project that prevent the debugger from running. If Cypress can connect the CY4532 kit with the Miniprog3 debugger, then “Attach to Target” using the same Cypress sample project, I think they may be able to see what I am seeing.
I have seen some your concerns on the 4532 kit.
SInce SWD_DAT and SWD_CLK lines are repurposed as GPIO's, 'Reset' or 'Rebuild' will cause IO re-initialization and hence SWD link will be disconnected.
As you said, It is not a problem with miniprog3.
If you are finding it difficult to debug over SWD, you can use a software UART component in the project and print out serial data for debug.
That makes total sense. Thanks, Rajath. We have been GPIO to debug. The SW UART is a good recommendation.