KitProg3 PSoC5 programming using python

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

cross mob
BoKo_3748966
Level 1
Level 1

Hi everyone,

I'm trying to use Python_Ex.py script to program PSoC5 using KitProg3 programmer.  When I run Python_Ex.py, everything seems to go well - data is transferred, all checks pass, chip is released. However, after script is finished it looks like the chip is left in a "bad" state. The code clearly doesn't work and when I try to debug it with attach to running target option, it looks like the CPU is either not running or executing some random code. What is interesting is that I can program the CPU with the same hex file using PSoC Programmer GUI with no issues. Another interesting observation is that I can remove all the parts of the Python_Ex.py that deal with actual programming and just run the chip acquisition and release and again the CPU is no longer working. I can restore CPU to working state by simply running checksum in PSoC Programmer GUI.

My question is this, what does PSoC Programmer GUI do that's different from Python_Ex.py when acquiring and then releasing the CPU?

Thank you for you help,

Boris

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

Hi Boris,

I am sorry I missed responding to this thread.

In the Python_Ex.py file there is a comment - #For PSoC5 LP call "Allow_Hard_Reset()" as in C#/C++ example

I implemented the function and called that before DAP_ReleaseChip and that worked for me. I have attached the python script for your reference. Please let me know if this works for you.

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B

View solution in original post

7 Replies