Announcements

Live Webinar: USB-C adoption. Simple & Cost-efficient solutions | April 18th @9am or 5pm CEST. Register now !

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

cross mob
drewfustini
Level 3
Level 3
10 replies posted 10 sign-ins 5 replies posted

I would like to program firmware onto a CCG3PA CYPD3175-24LQXQ using the SWD lines and OpenOCD.  However, I can not figure out the appropriate OpenOCD configuration file for the part.  Is there anywhere to find that?

1 Solution
drewfustini
Level 3
Level 3
10 replies posted 10 sign-ins 5 replies posted

UPDATE: I was able to program CCG3PA from OpenOCD using MiniProg4 as follows:

pdp7@x1:~/dev/dojofive/bcd/openocd$ git diff
diff --git a/jimtcl b/jimtcl
--- a/jimtcl
+++ b/jimtcl
@@ -1 +1 @@
-Subproject commit 0aa0fb4e3a38d38a49de9eb585d93d63a370dcf6
+Subproject commit 0aa0fb4e3a38d38a49de9eb585d93d63a370dcf6-dirty
diff --git a/src/flash/nor/psoc4.c b/src/flash/nor/psoc4.c
index 405d452cdd32..7ccb12f23579 100644
--- a/src/flash/nor/psoc4.c
+++ b/src/flash/nor/psoc4.c
@@ -251,6 +251,7 @@ const struct psoc4_chip_family psoc4_families[] = {
{ 0xAB, "PSoC 4100S", .flags = 0, .spcif_ver = spcif_v3 },
{ 0xAC, "PSoC 4100PS/PSoC Analog Coprocessor", .flags = 0, .spcif_ver = spcif_v3 },
{ 0xAE, "PSoC 4xx8 BLE", .flags = PSOC4_FLAG_IMO_NOT_REQUIRED, .spcif_ver = spcif_v2 },
+ { 0xB0, "CCG3PA USB Type-C Port Controller", .flags = 0, .spcif_ver = spcif_v3 },
{ 0xB5, "PSoC 4100S Plus", .flags = 0, .spcif_ver = spcif_v3 },
{ 0xB8, "PSoC 4100S Plus/PSoC 4500", .flags = 0, .spcif_ver = spcif_v3 },
{ 0xBE, "PSoC 4100S Max", .flags = 0, .spcif_ver = spcif_v3 },



This PR #5: https://github.com/cypresssemiconductorco/openocd/pull/5

Here are the results:

pdp7@x1:~/dev/dojofive/bcd/openocd$ openocd -s tcl -f interface/kitprog3.cfg -f target/psoc4.cfg -c "kitprog3 power_config on 3300; kitprog3 acquire_config on 0r1 5; init; kitprog3 acquire_psoc; program CYPD3171-24LQXQ_cla.hex verify reset exit"
Open On-Chip Debugger 0.10.0+dev-gd526e667dedf-dirty (2021-02-22-17:17)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
adapter speed: 2000 kHz
** Auto-acquire enabled, use "set PSOC4_USE_ACQUIRE 0" to disable
cortex_m reset_config sysresetreq
Info : CMSIS-DAP: SWD Supported
Info : CMSIS-DAP: JTAG Supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : KitProg3: FW version: 2.10.878
Info : KitProg3: Pipelined transfers enabled
Info : kitprog3: powering up target device using KitProg3 (VTarg = 3300 mV)
Info : VTarget = 3.307 V
Info : kitprog3: acquiring the device...
Info : clock speed 2000 kHz
Info : Power dropout detected, running power_dropout proc.
Sensed power dropout.
Info : SWD DPIDR 0x0bb11477
Info : psoc4.cpu: hardware has 4 breakpoints, 2 watchpoints
*****************************************
** Silicon: 0x2003, Family: 0xB0, Rev.: 0x12 (A1)
** Detected Family: CCG3PA USB Type-C Port Controller
** Detected Main Flash size, kb: 64
** Chip Protection: protection OPEN
*****************************************
Info : starting gdb server for psoc4.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : kitprog3: acquiring the device...
Info : psoc4.cpu: external reset detected
Info : SWD DPIDR 0x0bb11477
Info : SWD DPIDR 0x0bb11477
Error: DP initialisation failed
Info : kitprog3: acquiring the device...
Info : SWD DPIDR 0x0bb11477
psoc4.cpu halted due to debug-request, current mode: Thread
xPSR: 0xa1000000 pc: 0x1000003e msp: 0x20001fe8
** Device acquired successfully
** Programming Started **
auto erase enabled
Info : ignoring flash probed value, using configured bank size
[100%] [################################] [ Programming ]
Warn : no flash bank found for address 0x90300000
Warn : no flash bank found for address 0x90500000
Warn : no flash bank found for address 0x90600000
wrote 65600 bytes from file CYPD3171-24LQXQ_cla.hex in 1.789399s (35.801 KiB/s)
** Programming Finished **
** Verify Started **
verified 65600 bytes in 0.161609s (396.404 KiB/s)
** Verified OK **
** Resetting Target **
Info : SWD DPIDR 0x0bb11477
Info : SWD DPIDR 0x0bb11477
Error: DP initialisation failed
shutdown command invoked
Info : psoc4.dap: powering down debug domain...
Warn : Failed to power down Debug Domains

View solution in original post

0 Likes
5 Replies