- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does Cypress OpenOCD support the CCG3PA in Cypress Programmer when using the MiniProg4?
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 },
pdp7@x1:~/dev/dojofive/bcd/openocd$
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
NOTE: I have a pull request pending approval with this fix:
https://github.com/cypresssemiconductorco/openocd/pull/5
Solved! Go to Solution.
- Labels:
-
USB EZ-PD Type-C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
After confirmed with OPENOCD of Cypress developer and re-produced this issue with MiniProg3/4 and CY4532 board. We have to say that Cypress OpenOCD command-line interface (CLI) is not supporting CCGx devices currently. We are strongly recommend you use PSoC Programmer with MiniProg3/4 for SWD programming of CCGx Device. Or the third party of programmer have verified by Cypress/IFX could find out from the link:
https://www.cypress.com/products/device-programmer-system-partners
Thank you for your understanding.
Best Regards,
Lisa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May I take a look the "Cypress OpenOCD" you have been mentioned? CCG3PA can be programmed by miniProg4 and follow standard SWD specification (not including reset mode).
Best Regards,
Lisa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you know if KP3_REQUEST_ACQUIRE in Kitprog3/Miniprog4 firmware should work with CCG3PA?
I opened a GitHub issue to represent what I am attempting:
https://github.com/cypresssemi
I am trying to use MiniProg4 (KitProg3 FW version: 2.10.878) with CCG3PA (CYPD3171-24LQXQ). Currently, I can not get past the KP3_REQUEST_ACQUIRE USB request. Here is OpenOCD command that I am
using:
openocd -s ../scripts -f interface/kitprog3.cfg -f target/psoc4.cfg -c "kitprog3 power_config on 3300; kitprog3 acquire_config on 0 1 5; init; kitprog3 acquire_psoc; reset init; shutdown"
where "kitprog3 acquire_config on 0 1 5" means 0 for psoc4, 1 for power-cycle mode as CCG3GA lacks XRES pin and attempts is 5.
I modified src/flash/nor/psoc4.c to add CCG3PA family ID 0xB0 to psoc4_families[]. The MiniProg4 can connect to the DAP inside CCG3PA over SWD and read memory from the ROM table in the CCG3PA in
psoc4_get_family():
******************************
** 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
******************************
Unfortunately, 'kitprog3 acquire_psoc' fails with error code -4. Here is the full log:
https://gist.github.com/pdp7/8
MiniProg4 seems to receive the KP3_REQUEST_ACQUIRE usb request OK but it fails to actually run KP3_REQUEST_ACQUIRE inside the MiniProg4 firmware successfully:
https://github.com/cypresssemi
I would very much appreciate any additional insights you could provide.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am looking at Cypress OpenOCD CLI guide:
https://www.cypress.com/file/495061/download
I am using this repository:
https://github.com/cypresssemiconductorco/openocd
@ShifangZ_26 is there a way to make the CCG3PA work in OpenOCD?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
After confirmed with OPENOCD of Cypress developer and re-produced this issue with MiniProg3/4 and CY4532 board. We have to say that Cypress OpenOCD command-line interface (CLI) is not supporting CCGx devices currently. We are strongly recommend you use PSoC Programmer with MiniProg3/4 for SWD programming of CCGx Device. Or the third party of programmer have verified by Cypress/IFX could find out from the link:
https://www.cypress.com/products/device-programmer-system-partners
Thank you for your understanding.
Best Regards,
Lisa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lisa,
For the CCG3PA, there is only one approved production programmer listed and it seems to program only in a "chip in socket" format. For customers who have multiple firmware images on a board, it would be desirable to program at the board level. Are there any plans to approve a programmer that can do this?
Best wishes,
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pete,
Please you can contact your preferred programmer vendor and ask them to add support of the new devices.