cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6 MCU

PeTo_2990761
New Contributor II

Hello,

I have a PSoC 6 Wi-Fi BT Prototyping Kit, fresh out of the box. I'm unable to program using all the latest ModusToolbox and Cypress Programming software.

When trying to program through ModusToolbox (in both modes), it autodetects this device:

***************************************

** Silicon: 0xE453, Family: 0x102, Rev.: 0x12 (A1)

** Detected Device: CY8C624ABZI-S2D44

** Detected Main Flash size, kb: 2048

** Flash Boot version: 3.1.0.378

** Chip Protection: UNKNOWN

***************************************

This seems odd, I was expecting a different Device based on other Community posts, but at least it connects. Next it fails to erase:

Info : Flash write discontinued at 0x10001848, next section at 0x10002000

Info : Padding image section 0 at 0x10001848 with 440 bytes (bank write end alignment)

[ 53%] [################                ] [ Erasing     ]Error: timeout waiting for algorithm, a target reset is recommended

Error: SROM API execution failed. Status: 0x080008B4

Error: failed erasing sectors 0 to 12

** Program operation failed **

srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst

Info : SWD DPIDR 0x6ba02477

shutdown command invoked

Other posts recommend trying the Cypress Programmer. When I try to connect with the latest Cypress Programmer (3.0.0 build 463 with openocd 3.0.0.665, cybridge version 2.3.1.610, KitProg3 FW: 1.21.707), I get a Boost C++ library exception, in either mode (even running as Admin):

Info : [CyBridge] Start API initialization

Info : [CyBridge] Hardware initialization complete (666 ms)

Error: [CyBridge] CyBridge: Failed to open device - boost::interprocess_exception::library_error

Info : Disconnected - KitProg3 CMSIS-DAP BULK-05190A1C02179400 

Error: [CyBridge] CyBridge: Failed to open device - boost::interprocess_exception::library_error

Info : Disconnected - KitProg3 CMSIS-DAP HID-05190A1C02179400 

Error: [CyBridge] CyBridge: Failed to open device - boost::interprocess_exception::library_error

Advice on how to proceed?

Thanks,

Peter

0 Likes
1 Solution
Rakshith
Moderator
Moderator

Hello Peter,

Thank you for providing an update regarding this issue. Glad you are able to connect to your device now

Like you, I am not sure what the issue was and how it is resolved now. A windows update or any other update might have fixed it.

Please reference this thread and let us know if you face the same issue again.

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B

View solution in original post

0 Likes
22 Replies
Rakshith
Moderator
Moderator

Hi PeTo_2990761​,

Looking at the error from ModusToolbox, it seems like an incorrect BSP is set which is why you are unable to program the device. Can you please confirm that the right TARGET BSP is selected when programming the device?

A thread on a similar issue might help - load/execute was working, now it does not

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes
PeTo_2990761
New Contributor II

Hi Rakshith,

There are two problems with this answer.

1. The Cypress Programmer does not allow me to choose the BSP: every option is greyed out. Tell me how to set the BSP with the Cypress Programmer?

Screen Shot 2020-09-30 at 9.20.12 AM.png

2. The ModusToolbox is already set to the correct BSP, but the Configuration AUTO DETECTS the chip, I cannot control that. As you can see, I chose the correct option but OpenOCD is failing:

Screen Shot 2020-09-30 at 9.26.51 AM.png

As I cut-and-pasted into my first ticket, OpenOCD auto detects, how do I check and or fix the BSP openocd is using?

Peter

0 Likes
Rakshith
Moderator
Moderator

Hi Peter,

The Cypress Programmer does not allow me to choose the BSP: every option is greyed out

Can you please let me know if the Kit is connected in this case? All options are greyed out if no Kit is connected. Also, there should be a log entry whenever a device is connected. If you still do not find the device, can you please share the entire log of the Cypress Programmer?

The ModusToolbox is already set to the correct BSP

Can you please let me know how this was set? If it was set by just changing the makefile, then you will also have to Generate Launches again as mentioned in this thread - Re: modus toolbox kitprg3 debug

Please let me know your observations.

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes
PeTo_2990761
New Contributor II

RakshithM_16​,

Thanks for the follow up. I think maybe you can't see the pictures I am posting, because they answer  your questions. Let me try again, let me know if you don't see the pictures.

The kit is connected. Here you can the response when I press SW1 to change programming mode. The programmer clearly understands it is connected because it acknowledges the change of programming mode initiated by the switch.

Picture 1: Response from connecting the kit and pressing SW1 on the debugger. I start the programmer, connect the board, and press SW1 several times. The programmer keeps asking me to connect a USB device, but it clearly is aware that one is connected because it decodes the programming mode: HID vs BULK. Clearly this is a bug, no? How could it know the programming mode if it wasn't connected and monitoring SW1 press???

Screen Shot 2020-10-05 at 11.52.53 AM.png

Did you see this picture ^^^^^ ???

Regarding #2: Yes, I followed that issue and Generated the Launches, and it continues to fail after erase, as I have indicated earlier.

Let's fix the programmer issue first, I suspect once that is fixed the other issue will follow.

Thanks,

Peter

0 Likes
Rakshith
Moderator
Moderator

Hi Peter,

Can you let me know the OS and its version on which you are running Cypress Programmer? I have the PSoC 6 Wi-Fi BT Prototyping Kit (CY8CPROTO-062-4343W) and the same build of Cypress Programmer and I am unable to recreate the issue.

Do you have another device that you can try to connect and let me know if you are able to observe the same issue with the other device too?

Can you please run the fw-loader tool to list the connected devices and update the KitProg3 version? To do this please open command prompt in <ModusToolbox_installation_directoty>\tools_2.2\fw-loader\bin  directory and run the commands -

fw-loader --device-list

fw-loader --update-kp3

Please share the output logs of both the commands and share your observations.

You can use the following thread for reference - Re: Cannot program WiFi BT Pioneer Kit after switching to kitprog3 and then back to kitprog2

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes
PeTo_2990761
New Contributor II

Hello RakshithM_16​,

Windows 10 Pro, Version 1909, Build 18363.1082.

Let me know if you have trouble viewing the screen-shot below:

pastedImage_0.png

...as you can see, it appears that the device & bootloader is detected, but it cannot communicate with it.

I only have the one device.

Peter

0 Likes
PeTo_2990761
New Contributor II

RakshithM_16

I just bought a new PSoC 6 WIFI MT prototyping kit, exact same problem.

Did I miss a Win10 driver install or something simple like that?

Peter

0 Likes
PeTo_2990761
New Contributor II

The programmer works on a colleague's computer for both boards. What do I need to clean up on WIn10 to make it work on my system?

0 Likes
PeTo_2990761
New Contributor II

RakshithM_16

I remove the KitProg3 drivers, then re-installed the Cypress Programmer. Still no luck.

So I connected a USB sniffer to my computer and to my colleagues and found that on my machine, the final TX setup to begin an endpoint transfer fails on my machine, but not on the other machine. This descriptor query returns a different OUT packet. Instead of "E1 06 90", the other machine returns "E1 08 60" and then proceeds to transmit more data back to the host on the good machine, or throw the boost error on the bad machine. Same drivers, same software.

pastedImage_1.png

0 Likes
Rakshith
Moderator
Moderator

Hi Peter,

I am sorry for the delay in my response.

I have requested the internal team for support regarding this. Something is preventing CyBridge lib from opening a KitProg3 device and without recreating the issue it is difficult to find the root cause.

I remove the KitProg3 drivers

Can you please let me know the procedure followed to achieve this?

Please try the following and let us know your observations -

1. Re-install KitProg3 CMSIS device driver using the device manager

pastedImage_3.png

You can refer to KitProg3 User Guide for details regarding this.

2. Download the latest version of fw-loader 3.1.0 from here - Releases · cypresssemiconductorco/Firmware-loader · GitHub

Run the fw-loader tool and check if the issue is reproduced.

3. If the issue still exists, please run the command -

fw-loader --device-list --debug

and share the log.

I will be adding to this thread as soon as I get further updates from the internal team.

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes
PeTo_2990761
New Contributor II

RakshithM_16

1. Yes, that is how I uninstalled.

2. Here is the response from fw-loader 3.1.0:

$ ./fw-loader.exe  --device-list --debug

Cypress Firmware Updater, Version: 3.1.0.834

(C) Copyright 2018-2020 by Cypress Semiconductor

All Rights Reserved

Info: Start API initialization

Debug: libusb_devicemgr initializing

Debug: libusb_devicemgr lookForDeviceChange() Enter

Debug: libusb_devicemgr::lookForDeviceChange. Number of connected devices = 3

Debug: libusb_devicemgr::addDevice: processing VID=8087 PID = aaa

Debug: libusb_devicemgr::addDevice: processing VID=4b4 PID = f155

Debug:           Interface # [0] is in bulk, descriptor: KitProg3 CMSIS-DAP

Debug:           Endpoints: 2, ep_in: 82, ep_out: 1

Debug:           Found Bulk devicedb config: KitProg3 CMSIS-DAP BULK

Debug: libusb_devicemgr::addDevice: VID=4b4 PID = f155 Interface number = 0 Location =1:2

Debug: libusb_deviceobj::open()

Debug: libusb_open ( 4b4 f155 ) = 0

Debug: libusb_deviceobj: create: 4b4 f155

Debug: >> libusb_deviceobj::close()

Debug: << libusb_deviceobj::close()

Debug:          libusb_deviceobj created

Debug: kitprog_upgrade::kitprog_upgrade called

Debug: kitprog_common::kitprog_common called

Debug: cmsisdap() called

Debug: kitprog_bulk::kitprog_bulk called

Debug:           LibUSB createDevice is successful

Info: Connected - KitProg3 CMSIS-DAP BULK-080F19D900078400

Debug: libusb_devicemgr::addDevice: processing VID=8086 PID = a36d

Debug: libusb_devicemgr lookForDeviceChange() Exit

Debug: hidapi usb manager initializing

Debug: hidapi_devicemgr::lookForDeviceChange() Enter

Debug: hidapi_devicemgr::addDevice: processing VID=4b4 PID = f155 Product =KitProg3 bridge Interface num =1

Debug: processed 1 hid devices

Debug: hidapi_devicemgr::lookForDeviceChange() Exit

Info: Hardware initialization complete 484 ms

Error: CyBridge: Failed to open device - boost::interprocess_exception::library_error

Connected supported devices:

        1: KitProg3 CMSIS-DAP BULK-080F19D900078400

Debug: usb_devicemgr::removeDevice: location = 1:2

Debug: kitprog_bulk::~kitprog_bulk called

Debug: kitprog_common::~kitprog_common called

Debug: ~cmsisdap() called

Debug: libusb_deviceobj: destroy: 4b4 f155

Debug: m_api_p->shutdown() completed

Debug: ~libusb_devicemgr() Enter

Debug: ~jlink_devicemgr() Exit

Debug: ~hidapi_devicemgr() Enter

Debug: ~hidapi_devicemgr() Exit

Debug: ~serial_devicemgr() Enter

Debug: ~serial_devicemgr() Exit

0 Likes
PeTo_2990761
New Contributor II

Also, it appears to be using the default Windows USB driver:

pastedImage_0.png

0 Likes
Rakshith
Moderator
Moderator

Hi Peter,

I have forwarded the log to the internal team. I will respond on this thread as soon as I get an update regarding this issue. Can you please let me know if you have run the fw-loader command in the command prompt?

Regarding the driver, it is the same on my PC too -

pastedImage_0.png

Best Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes
PeTo_2990761
New Contributor II

Hi RakshithM_16​,

I've moved to a new Linux install due to this holding up development, and it works fine under Linux. However, I would prefer to keep all my development on my primary Win10 machine, so I'll keep following this & debugging.

Thanks,

Peter

0 Likes
PrSo_4744096
New Contributor

Hi PeTo_2990761​,

I happened to face this issue sometime back and it was due to the USB not being enumerated. You could try uninstalling all the USB drivers that show up with a warning sign in device manager.

Also, select the following option in device manager.

0 Likes
PrSo_4744096
New Contributor

Screenshot 2020-10-23 083623.png

The screenshot didn't get added in my previous comment.

0 Likes
PeTo_2990761
New Contributor II

Can you elaborate on this? I don't see any USB Drivers with warnings in the Device Manager.

0 Likes
Rakshith
Moderator
Moderator

Hi Peter,

Can you please let me know if a registry key with the name BootId is present in your environment?

Please run the Registry Editor and traverse to the path - Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters

Please share a screenshot as shown -

pastedImage_0.png

Thanks and regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes
Rakshith
Moderator
Moderator

Hi Peter,

Can you please perform these steps so that we can get some more debug information? -

1. Please connect your KitProg3 device and run fw-loader 3.1.0 again with the command - fw-loader --device-list

2. Check the hidden folder "C:\ProgramData" for the cybridge-ipc-lock file in the sub-folder boost_interprocess\xxxxx_xxxxx. The subfolder where the cybridge-ipc-lock file is located can have arbitrary name represented by x. 3800000_EF0A0000 in the below screenshot.

3. Please share the file on this thread.

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes
PeTo_2990761
New Contributor II

Hi Rakshith,

Here's the lock file:

pastedImage_0.pngpastedImage_1.png

:
:
:
:

However, as of today, BOTH boards appear to now work with programmer version 3.1.0 and version 3.0.0 (command line and GUI). I've literally not changed anything on this machine that I am aware of, and the boards have no modifications beyond Board A has the programmer snapped off and Board B has additional jumpers soldered on.

I'm baffled as to how this repeatedly did not connect for months and now works (erase, program)???

Peter

0 Likes
Rakshith
Moderator
Moderator

Hello Peter,

Thank you for providing an update regarding this issue. Glad you are able to connect to your device now

Like you, I am not sure what the issue was and how it is resolved now. A windows update or any other update might have fixed it.

Please reference this thread and let us know if you face the same issue again.

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B

View solution in original post

0 Likes
Top labels