About 85% of the time after the device outputs "...successfully programmed at..." I receive 2 errors (see below). I get these errors on multiple devices (PSoC 4200L and PSoC 4200M). This happens even when I use example code from Cypress.
Currently I am using PSoC Creator 4.2 on windows 7 and encounter the problem in multiple example projects/codes such as I2C_SCB_Master, I2C_SCB_Slave, Breathing_LED, etc.
The debug select in the system tab of the .CYDWR file is set to SWD (serial wire debug).
I've used example code from cypress, and made sure only one device is plugged in at a time.
I'm not using sleep or deep sleep modes
I've tried different USB cables, and different USB ports.
To my knowledge PSoC creator is whitelisted on AV software (also not getting any red flags in AV software) and disabling AV software is not an option .
The only solution I have found thus far is to unplug the device wait a second and re-plug in the device, and then I usually have to select the target and click port acquire multiple times in order to acquire the target and connect.
PSoC Creator Error dbg.M0007
The run request failed. Encountered error (Invalid thread id: 1)
The request to run the application on the target failed. Make sure that your code is valid and that the selected target supports debugging.
PSoC Creator Error dbg.M0015
Debugger exited unexpectedly during run. Encountered error (Remote communication error. Target disconnected.: No error.)
There was an unhanded error during the debug session. This has forced the debugger to shutdown. Try again.
Unless there is some sort of register I need to clear, I'm out of ideas and searching for the errors hasn't proved fruitful.
Can anyone point me in the right direction for dealing with these errors?
Thanks in advance
I had similar issue a while ago, then it disappeared. Can't think anything changed in software. I suspect that cable was changed. I believe that during those issues the board supply voltage was lower then usual (~4:7V).
The new cable has no effect.
Vin measured from J13 on the Lseries pioneer kit is 4.6V even when attempting to connect..
The operating voltage jumper is set to 3.3V and the 3.3V LDO seems to be working fine as VDD measures at 3.34V
VBUS on the Mseries prototype kit is measuring at 5.0V
...if I click "Port Acquire" repeatedly and quickly (possibly out of exasperation) and then am able to click "OK/Connect" quickly it seems to increase the success rate of actually entering debug mode.
I am using the default debugger built into PSoC creator 4.2
Toolchain: GCC 5.4-2016-q-2-update
Debug target: Application Code and Data
Sorry I should have been clearer. I wanted to know which programmer/debugger you are using like Kitprog/Miniprog3. The errors suggest a bad USB cable, it seems to be disconnecting due to a loose connection or something.
Please change the cable and also maybe try a different USB port on your PC.
I am using Kitprog version 2.21.
I have used 3 different cables and tried multiple USB ports to no avail.
The debug select in the system tab of the .CYDWR file is set to SWD
I am using example code for the pioneer kit, so I don't think there are any WDT/ resets in the code.
I have clicked delete all breakpoints and then added a single one in main, after where initialization/startup code is supposed to go and still get the issue.
I am not familiar with where to find the IMO segment code, and I can't find anything that looks like a setting for a "debug clock", can you point me to some documentation for that?
In PSoC Creator, please go to Tools > Options > Program/Debug > Port Configuration > Miniprog3. Please check the value of clock speed setup.
You need to make sure the clock speed is less than 1/3 of the bus clock frequency at which the PSoC operates. Anything less than 6Mhz should work without any problems. Please check this value.
I checked that value, it is 1.6MHz.
However, I am using Kitprog (version 2.21, not miniprog. Is there a relationship between the settings for miniprog3 and kitprog and that I am unaware of?
Also, I don't see any clock options in:
Tools > Options > Program/Debug > Port Configuration > Kitprog2
Today got exactly the same problem but with CY8CKIT-059. Yesterday and this morning all was OK. CY8CKIT-059 examples behave similar. In rare cases when debug launched single steps may took up to several tens of seconds.
Also, during normal debug process KitProd LED flashes rapidly. I case of fail connection it stays permanently on.
Can you try downloading the latest PSoC Programmer from here: https://www.cypress.com/products/psoc-programming-solutions ?
Then restart PSoC Creator and check if it solves your issue.
I used a minprog 4.
Miniprog4: I Upgraded the device, closed the programmer app, unplugged the device, restarted creator, and still had device thread id error.
Miniprog3: Debugging worked like a charm
I changed nothing between these two debug tests
I installed PSoC programmer 3.28.5, and used the utility "upgrade firmware". It succeeded and still displays KitProg Version 2.21
Same issue as before.
Can you please explain your hardware setup? Are you using a Cypress kit or your own custom board? Also, can you please try using a Miniprog if you have one and check if you are able to debug?
This may not apply to your case,
but recently I encountered a similar situation.
May be checking where you place the board and PC makes some difference.
I will try it out in a different location. Though, I'm using it on a grounded ESD mat and the USB cable is shielded with a choke.
You have a much better environment than mine, but I hope that trying some will not harm.
I just created a project for 4200M (CY8CKIT-044/CY8C4247AZI-M485) with PSoC Creator v4.2.
As it has "NO" I/Os, I hope that it is safe to be used with any hardware.
And it is debuggable with my PSoC Creator v4.2.
If you can build and debug this project with your PSoC Creator v4.2,
I hope that your PSoC Creator v4.2 should be basically fine,
but some functions from v4.1 is not happy working with v4.2.
If you can not build or debug this project with your PSoC Creator v4.2
there may be problem with the installation of your PSoC Creator v4.2.
I'm also having the same problem:
The run request failed. Encountered error (Invalid thread id: 1)
I'm using the CYKIT-059.
The problem persists, even if i plug it directly into an USB Hub (2.0, 3.0, doesn't matter) (w or w/o cable).
To me I suspect a problem with "new" Software Windows 10.
The failure rate is 4 out of 5, so debugging is getting quite annoying.
Had this problem several times with 4.1 and 4.2.
Sometimes reboot works, several times now it took days to recover (still working on the code without debugging).
Last time, after 1 week of errors, I bought a Miniprog 4, plugged it in, connected to the target and (after selecting CMSIS-DAP HID mode) it was working. Rest of the setup unchanged!
Then just connected the Miniprog 3 back to the target and worked again, much faster than Miniprog 4. Since then it is working.
I think it is a problem with the Kitprog firmware version or something to do with the PSoC programmer.
I upgraded to PSoC creator 4.3 and PSoC Programmer 3.28.7 on a different computer running Windows 10 that was working with previous versions. After upgrading the firmware on a working CY8CKIT-059, I encountered the same problems that I was encountering with the CY8CKIT-046 (4200L Series) and CY8CKIT-043 (4200M Series).
I was able to observe more informative error messages in PSoC Creator 4.3:
The 4200L also exhibited these errors, and at times was unable to even be viewed in the port acquire window because it was giving a message as if it were busy and a port was open by PSoC Programmer. However, PSoC programmer was not open, but when I opened it (to establish and close the connection) PSoC programmer could not connect because it was saying the 4200L was busy. ( It is worth noting again that the code/project loaded onto the devices is the simple blinking LED Example code provided by Cypress)
I attempted to do a factory install/recovery of the kitprog bootloader (per the Kitprog User guide) by holding the reset button when plugging into PSoC programmer to no avail.
I uninstalled all cypress products from my computer and then installed PSoC 4.1 Update 1, I flashed the Kitprogs on both the 4200L and 5LP with whichever version of PSoC programmer came with the PSoC Creator 4.1 Update1, and they both worked fine.
After a bit of back and forth with different versions of PSoC creator and PSoC programmer (and the resulting Kitprog versions) I Isolated the problem to the Kitprog versions greater than Kitprog v2.18 (couldn't find version 2.19)
I can debug in PSoC Creator 4.3 if I am using Kitprog version 2.18, resulting from ‘upgrading’ the firmware using PSoC Programmer version 3.26, though I have to ignore warnings about firmware matching….After reverting the Kitprog firmware to v2.18, PSoC Programmer can be updated to its current version 3.28.7 and you can still debug
Thus I think it is a problem with PSoC Programmer, or Kitprog firmware or both...unless I've somehow duplicated a bad environment via default preferences