zceemja / psoc1_prog

Cypress PSoC1 Programmer using Arduino nano
5 stars 2 forks source link

Issues with CY8C27443 #2

Open dionvalentine opened 1 year ago

dionvalentine commented 1 year ago

Thanks for sharing your project.

I'm having issues connecting to CY8C27443. I'm using a Nano 328p, is there any additional connections required to the PSOC to set it to programming mode? I don't appear to be able to detect the PSOC. I've tried two different PSOC's. Any additional f\advice would be greatly appreciated. Thanks

Output device identification

Traceback (most recent call last): File "D:\PSOC programmer\PSOC_1\programmer.py", line 207, in print(prog.get_device_name()) File "D:\PSOC programmer\PSOC_1\programmer.py", line 119, in get_device_name devid = self.get_device_id() File "D:\PSOC programmer\PSOC_1\programmer.py", line 90, in get_device_id return int(res[:-4], 16) ValueError: invalid literal for int() with base 16: b''

Output when trying to flash device:

PSoC1_Prog: erasing memory PSoC1_Prog: writing program

Writing 0x00 [1.56%] Writing 0x01 [3.12%] Writing 0x02 [4.69%] Writing 0x03 [6.25%] Writing 0x04 [7.81%] Writing 0x05 [9.38%] Writing 0x06 [10.94%] Writing 0x07 [12.50%] Writing 0x08 [14.06%] Writing 0x09 [15.62%] Writing 0x0a [17.19%] Writing 0x0b [18.75%] Writing 0x0c [20.31%] Writing 0x0d [21.88%] Writing 0x0e [23.44%] Writing 0x0f [25.00%] Writing 0x10 [26.56%] Writing 0x11 [28.12%] Writing 0x12 [29.69%] Writing 0x13 [31.25%] Writing 0x14 [32.81%] Writing 0x15 [34.38%] Writing 0x16 [35.94%] Writing 0x17 [37.50%] Writing 0x18 [39.06%] Writing 0x19 [40.62%] Writing 0x1a [42.19%] Writing 0x1b [43.75%] Writing 0x1c [45.31%] Writing 0x1d [46.88%] Writing 0x1e [48.44%] Writing 0x1f [50.00%] Writing 0x20 [51.56%] Writing 0x21 [53.12%] Writing 0x22 [54.69%] Writing 0x23 [56.25%] Writing 0x24 [57.81%] Writing 0x25 [59.38%] Writing 0x26 [60.94%] Writing 0x27 [62.50%] Writing 0x28 [64.06%] Writing 0x29 [65.62%] Writing 0x2a [67.19%] Writing 0x2b [68.75%] Writing 0x2c [70.31%] Writing 0x2d [71.88%] Writing 0x2e [73.44%] Writing 0x2f [75.00%] Writing 0x30 [76.56%] Writing 0x31 [78.12%] Writing 0x32 [79.69%] Writing 0x33 [81.25%] Writing 0x34 [82.81%] Writing 0x35 [84.38%] Writing 0x36 [85.94%] Writing 0x37 [87.50%] Writing 0x38 [89.06%] Writing 0x39 [90.62%] Writing 0x3a [92.19%] Writing 0x3b [93.75%] Writing 0x3c [95.31%] Writing 0x3d [96.88%] Writing 0x3e [98.44%] Writing 0x3f [100.00%] PSoC1_Prog: writing secure PSoC1_Prog: checking checksum Traceback (most recent call last): File "D:\PSOC programmer\PSOC_1\programmer.py", line 194, in csum = prog.read_checksum() File "D:\PSOC programmer\PSOC_1\programmer.py", line 104, in read_checksum return int(res[:-4], 16).to_bytes(2, 'big') ValueError: invalid literal for int() with base 16: b''

zceemja commented 1 year ago

Hey, you should not need any additional hardware, just wires connected. I should add check if empty response is returned from programmer to inform that chip is not talking back at all. Can you tell me more about your CY8C27443 setup?

Maybe try reducing clock by increasing delay in main.cpp: #define DELAY for(i=0;i<100;i++);

I would also recommend getting some cheap logic analysers to debug signals from programmer and PSOC, this is how I mainly build this programmer.