- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
The errors:
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
- Labels:
-
PSoC Creator Software
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There have been issues like yours that were caused by the USB cable. Can you use a different/shorter one?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bob,
Thanks for the advice, I've ordered a shorter cable with ferrite choke.
-KeSn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
KeSn.
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).
/odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
/odissey1
Good to know! I've ordered a different cable and will check the board supply voltage.
-KeSn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Update:
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the debugger you are using?
Regards,
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
-KeSn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Regards,
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dheeraj,
I am using Kitprog version 2.21.
I have used 3 different cables and tried multiple USB ports to no avail.
-KeSn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Check if the Debug Select option in the DWR settings is configured properly (see the figure below). If this is configured as GPIO, then debugging will not be enabled.
- Check if the debugging clock frequency is fast. If the debug clock frequency is more than one-third of the system clock, then debugging cannot be done properly.
- Check if there is a software breakpoint in the IMO frequency initialization segment in the code startup section. The debug process needs the IMO to be initialized correctly. It is not recommended to use software breakpoints in the IMO initialization section.
- Check if you have WDT or software reset statements in the code. These reset states will cause disconnection.
Regards,
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dheeraj,
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?
Thanks,
KeSn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Regards,
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dheeraj,
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
Thanks
-KeSn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Switching to Creator 4.1 solved the problem. Debugging works with both Kitprog and MiniProg3.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4.3 Beta - same issue as in 4.2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello KeSn,
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.
Regards,
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dheeraj
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.
-KeSn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Regards,
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PSoC 4200L and PSoC 4200M pioneer kits (one at a time)
I do not have a miniprog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
This may not apply to your case,
but recently I encountered a similar situation.
dbg.M0015 noise matters aka PSoC in a bookshelf
May be checking where you place the board and PC makes some difference.
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi moto,
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear KeSn-san,
You have a much better environment than mine, but I hope that trying some will not harm.
Best Regards,
23-Nov-2019
Motoo Tanaka
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
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.
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
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.
Regatds
Bodo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dheeraj,
Is this the same blinking LED project that you can find in the start page under kits?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dheeraj,
I have tried it with your example and received the same errors
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
- In the Select Debug Target window: device name says PSoC 5LP CYC5888LT*-LP097 instead of CYC5888LTI-LP097 and has yellow warning triangle with message "Could not stop processor, click port acquire to reset”
- clicking port acquire did not work (will either not respond or throw dbg.M0036).... unplugging and re-plugging the devices reset this error
- In the Select Debug Target window: The device shows up as “ARM Debug Port” instead of the chip/device name “This device was recognized, but PSoC Creator does not support using it at this time”
- Clicking port acquire repeatedly will sometimes get it to acquire the target.
- In the Select Debug Target window: Clicking port acquire will throw Error dbg.M0036 : “Error Unable to acquire target device PSoC5LP CY8C5888LT*-LP097: SWD error OK|WAIT|FAULT was received while trying to change the selected target”
- If able to get past port acquire then Error dbg.M0007: “The run request failed. Encountered error (Invalid thread id:1)” and Error dbg.M0015: “Debugger exited unexpectedly during run. Encountered error (Remote communication error. Target disconnected.: No error.)” will most likely appear preventing debug
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