Hi i am trying to program a CY8C4146AZS-S265 which i have developed on a PC board. i am using MiniProg3 to flash the code by using SWD prtotocol and dedicated pins. pin 20 and Pin 21 on uc. sometimes the code burns and sometimes it gives error. whereas whenever i use the flasher that has come with CY8CKIT-149 PSoC® 4100S Plus Prototyping Kit, the code successfully burn every time. what could be the cause??
PSoC 4 Architecture
Try changing your clock speed to different values and see if they perform better; I've run into this before, and it seems related to the USB cabling.
i tried this. there is a situation i would like to point further, i have two similar boards, exactly similar in all aspects of components. one board i am able to program using miniprog3 while the other i cannot.it gives the error as " there was an error while programming the device. failed to re-aquire the device"
Also at the same time if i program them with the MIniprog2 that came with CY8CKIT-149 PSoC® 4100S Plus Prototyping Kit, the code successfully burn every time on both the boards.
If the two boards are exactly the same, then the issue would point to poor connections with the programmer imo.
Adjusting length of USB cable or SWDIO wire lengths to be shorter generally help in those cases, and reseating the programmer headers to make sure it didn't wiggle loose.
Depending on the code running on the device, and which "reset" choice you have enabled, application code on the board that is running might be interfering with the programming too.
Are you using RESET mode or Power Cycle mode to burn PSoC4?
If it was Power Cycle, kindly try RESET mode.
In addition, troubleshooting about PSoC programming, refer to: