Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 4

Li_Qiang
Level 4
50 replies posted 50 sign-ins 25 replies posted
Level 4

Hello,

The chip I use is CY8C4147LQS-S283, because I want to reconfigure all the pins when the MCU starts, so I made some pin configurations in the attachment, but when I programs the modified program into the MCU, I found The program can no longer be debugged with PSoC Creator, and the error "FAILED! PSoC device is not acquired!" is displayed when the PSoC Programmer is programmed. Is there any error in the pin configuration I made? How can I re-program?

0 Likes
1 Solution
BiBi_1928986
Level 7
250 replies posted 250 sign-ins 100 solutions authored
Level 7

Hello.

I think the problem is the combination of Miniprog4, external powering, GPIO alternate SWD.

Reading the PSoC Programmer release notes, there has been a long time problem with programming devices where GPIO is selected in place of SWD signals.
PSoC® Programmer Release Notes (cypress.com)  See page 3.  I've asked Cypress in the past about the 'proprietary mode', and what Cypress calls 'Test Mode', but never got a reply.  So, I don't know what Cypress is talking about in the release notes for the workaround.

I've gotten around this problem by using Power Cycle Programming and sometimes by using Mass Storage Programmer, using Kitprog1 (snap off part of KIT-059).

Because your PSoC target is externally powered, the hardware isn't set up to use Power Cycle programming method.  However, you can still try it to see if it will work.

On PSoC Programmer, there is a tab to 'toggle' power.  You can try using this, but no guarantee it will do anything.  Sorry I don't have better news to help you.

View solution in original post

0 Likes
10 Replies
BiBi_1928986
Level 7
250 replies posted 250 sign-ins 100 solutions authored
Level 7

Hello.

Question: Were you able to program the target chip the first time?  If no, then you have a schematic error.  If yes, then your code is messing around with SWD pins on port 3.2 and 3.3.

I see your code does modify port 3.2 and 3.3 if you have the 'debug' flag not set.  This can prevent PSoC Creator from accessing target device unless your hardware supports Power Cycle programming method.

You can attempt to program target from PSoC Programmer application.  You might have better success.

0 Likes
Li_Qiang
Level 4
50 replies posted 50 sign-ins 25 replies posted
Level 4

Thank you for your reply. You are right. It is true that I should not modify the port 3.2 and 3.3 ports, but I also failed to use PSoC Programmer with the error "PSoC device is not acquired". Is there any other way to solve the problem of not being able to program?

Best Regards

0 Likes
BiBi_1928986
Level 7
250 replies posted 250 sign-ins 100 solutions authored
Level 7

Hello.

Question: Were you able to program the target chip at least one time?

0 Likes
Li_Qiang
Level 4
50 replies posted 50 sign-ins 25 replies posted
Level 4

Hello.

After I programed the wrong code, I could no longer successfully program the target chip at least one time. There was no problem before.

Best Regards.

0 Likes
Li_Qiang
Level 4
50 replies posted 50 sign-ins 25 replies posted
Level 4

Hello.

This error code is the first to be called in the main function. It seems that the programmer is too late to recognize the chip through SWD, because the SWD port is changed immediately after power-on. Is there any way to refresh the program? If there is any way, please tell me, thank you very much.

Best Regards.

0 Likes
BiBi_1928986
Level 7
250 replies posted 250 sign-ins 100 solutions authored
Level 7

Hello.

Which programmer are you using?  Miniprog3, Miniprog4, Kitprog, Kitprog2, Kitprog3

Did you connect XRES from target chip to the programmer?

Is the programmer supplying voltage to the target chip or is target chip powered external to programmer?

What is voltage level applied to target chip?  3.3V or 5V

Did you connect Vccd to a 0.1uF capacitor and nothing else as shown in datasheet?

If you apply power to the target chip, can you measure the voltage at Vccd pin.  It should read 1.8V.

edit:  If the wires connecting target SWD to programmer SWD are longer than 5-10cm, the signals are not reliable.  I've never had issues using 5cm long wires.

0 Likes
Li_Qiang
Level 4
50 replies posted 50 sign-ins 25 replies posted
Level 4

Hello.

Thank you very much for your reply.

Which programmer are you using?  Miniprog3, Miniprog4, Kitprog, Kitprog2, Kitprog3

->Miniprog4.

Did you connect XRES from target chip to the programmer?

->Yes.

Is the programmer supplying voltage to the target chip or is target chip powered external to programmer?

->target chip is  powered external to programmer.

What is voltage level applied to target chip?  3.3V or 5V

->3.3V

Did you connect Vccd to a 0.1uF capacitor and nothing else as shown in datasheet?

->Yes.

If you apply power to the target chip, can you measure the voltage at Vccd pin.  It should read 1.8V.

-> Vccd pin can be measured 1.8V.

edit:  If the wires connecting target SWD to programmer SWD are longer than 5-10cm, the signals are not reliable.  I've never had issues using 5cm long wires.

->I think my SWD cable is beyond this distance, but I can program normally before, even so I will try to shorten the distance.

Best Regards.

0 Likes
BiBi_1928986
Level 7
250 replies posted 250 sign-ins 100 solutions authored
Level 7

Hello.

I think the problem is the combination of Miniprog4, external powering, GPIO alternate SWD.

Reading the PSoC Programmer release notes, there has been a long time problem with programming devices where GPIO is selected in place of SWD signals.
PSoC® Programmer Release Notes (cypress.com)  See page 3.  I've asked Cypress in the past about the 'proprietary mode', and what Cypress calls 'Test Mode', but never got a reply.  So, I don't know what Cypress is talking about in the release notes for the workaround.

I've gotten around this problem by using Power Cycle Programming and sometimes by using Mass Storage Programmer, using Kitprog1 (snap off part of KIT-059).

Because your PSoC target is externally powered, the hardware isn't set up to use Power Cycle programming method.  However, you can still try it to see if it will work.

On PSoC Programmer, there is a tab to 'toggle' power.  You can try using this, but no guarantee it will do anything.  Sorry I don't have better news to help you.

0 Likes
Li_Qiang
Level 4
50 replies posted 50 sign-ins 25 replies posted
Level 4

Hello.

Thank you very much, it is of great help to me, the problem has been solved, I led out some wires on the hardware device to turn it into a programmer to supply power, and the power cycle programming method can be used to complete the programming.

Best Regards.

0 Likes
BiBi_1928986
Level 7
250 replies posted 250 sign-ins 100 solutions authored
Level 7

Hello.

This is very good news.  Congratulations!
Good luck with your project.

0 Likes