5 Replies Latest reply on Apr 29, 2020 1:18 PM by RakshithM_16

    Programming CYPROTO-062-4343W chip with KitProgram3 breakout

    JoWi_4630346

      Hey All,

       

      I have been programming a custom board with the CY8C6247BZI-D54 chip through the SWD interface using the Kitprog3 breakout board from CYPROTO-062-4343W-BLE-WIFI development board.

       

      For a while it was not recognizing the target device until I changed :

      -c "source [find interface/kitprog3.cfg]" to -c "source [find interface/cmsis-dap.cfg]"

       

      and now it stops working as says "Error: DAP 'psoc6.cpu' initialization failed (check connection, power, etc.)"

       

      I have checked that the power and the configuration pins are set correctly.

       

      Info : CMSIS-DAP: SWD  Supported

      Info : CMSIS-DAP: FW Version = 1.2.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 : clock speed 1000 kHz

       

      The only other information I am given is that :

       

      "

      Failed to execute MI command:

      -target-select remote localhost:3333

      Error message from debugger back end:

      localhost:3333: No connection could be made because the target machine actively refused it.

      "

      But I'm not sure how to address the issue above. I have read that it might be a race condition ?

       

       

       

       

        • 1. Re: Programming CYPROTO-062-4343W chip with KitProgram3 breakout
          RakshithM_16

          Hi JoWi_4630346,

           

          Can you try changing the KitProg3 mode to BULK mode? You can refer to the KitProg3 User Guide for more information regarding the modes of KitProg3.

          After this can you change back to the interface/kitprog3.cfg script and let me know if this helps.

           

          Are you using ModusToolbox to program the device or directly using OpenOCD? Can you please share all the OpenOCD commands used to program the device?

           

          Thanks and Regards,

          Rakshith M B

          • 2. Re: Programming CYPROTO-062-4343W chip with KitProgram3 breakout
            JoWi_4630346

            Hey rakshithM_16,

             

            I am using the ModusToolbox to program the device. The first thing I tried when I tried programming was to program the KitProg in BULK mode and with the interface as "interface/kitprog3.cfg" and it did not work. It said that kitprog3 could not find the psoc6.

            That's why I switched to HID mode and tried changing the script.

             

            Here are all the config settings :

            -s "${openocd_path}/../scripts"
            -s "./libs/TARGET_CY8CPROTO-062-4343W/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource"
            -c "source [find interface/cmsis-dap.cfg]"

            -c "puts stderr {Started by GNU MCU Eclipse}"
            -c "source [find target/psoc6.cfg]"
            -c "psoc6.cpu.cm4 configure -rtos auto -rtos-wipe-on-reset-halt 1"
            -c "gdb_port 3332"
            -c "psoc6 sflash_restrictions 1"
            -c "init; reset init"

            • 3. Re: Programming CYPROTO-062-4343W chip with KitProgram3 breakout
              RakshithM_16

              Hi JoWi_4630346,

               

              The KitProg3 should be able to detect the device in BULK mode. Can you try connecting to the device using Cypress Programmer? Please share the log when you try connecting the device. Do you have access to a MiniProg4 programmer/debugger? If so, can you please try connecting to the device using MiniProg4?

              As you are using a custom board, the issue might be because of problems with the schematic and layout design of your custom board. Please ensure that your design matches with the PSoC 6 Hardware Design Considerations document.

               

              Thanks and Regards,

              Rakshith M B

              • 4. Re: Programming CYPROTO-062-4343W chip with KitProgram3 breakout
                JoWi_4630346

                Thanks for the info.

                I do not have access to a MiniProg4. When I tried changing the mode to using the kitProg3 interface I still was unable to program. Below is the log:

                 

                Open On-Chip Debugger 0.10.0+dev-2.2.0.249 (2019-09-10-10:57)

                Licensed under GNU GPL v2

                For bug reports, read

                http://openocd.org/doc/doxygen/bugs.html

                adapter speed: 1500 kHz

                adapter speed: 1000 kHz

                ** Auto-acquire enabled, use "set ENABLE_ACQUIRE 0" to disable

                cortex_m reset_config sysresetreq

                cortex_m reset_config vectreset

                Info : Using CMSIS loader 'CY8C6xxx_SMIF' for bank 'psoc6_smif0_cm0' (footprint 6105 bytes)

                ocd_gdb_restart

                Warn : SFlash programming allowed for regions: USER, TOC, KEY

                Info : CMSIS-DAP: SWD  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 : VTarget = 3.301 V

                Info : kitprog3: acquiring PSoC device...

                Error: kitprog3: failed to acquire PSoC device

                Info : clock speed 1000 kHz

                Error: DAP 'psoc6.cpu' initialization failed (check connection, power, etc.)

                ** OpenOCD init failed **

                shutdown command invoked

                ** Program operation failed **

                srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst

                 

                When I program it through the Psoc Programmer 3.8.5  I get the following :

                 

                Successfully Connected to KitProg3 (CMSIS-DAP/BULK/191617F302098400) at 3:40:14 AM | KitProg3. CMSIS-DAP Version 2.0.0. Firmware Version 1.01.158. Hardware Id 11.

                Opening Port at 3:40:14 AM  |

                | Select Port in the PortList, then try to connect

                Memory Types Load from HEX Finished at 3:31:22 AM    |

                | Hex File parsing failure. Unknown record type.

                Device set to CY8C6246BZI-D04 at 3:31:22 AM  | 524288  FLASH bytes

                Device Family set to CY8C62xx at 3:31:22 AM    |

                Memory Types Load from HEX Requested at 3:31:21 AM  |

                Active HEX file set at 3:31:21 AM  | C:\......

                \build\CY8CPROTO-062-4343W\Debug\mtb-example-psoc6-hello-world.hex |   | Users must be aware that the following PSoC device should not be powered or programmed at 5V. Doing so will cause damage to the devices: CY8C6xxx, CYRF89xxx

                Session Started at 3:31:21 AM                                                      | PPCOM Version 37.0

                 

                Yes I am using a custom board. Not all of the power rails are decoupled and there are some power inputs that have the incorrect capacitance on them.

                • 5. Re: Programming CYPROTO-062-4343W chip with KitProgram3 breakout
                  RakshithM_16

                  Hi JoWi_4630346,

                   

                  When I program it through the Psoc Programmer 3.8.5  I get the following :

                  You are getting the "Hex file parsing failure error" because you are using the ModusToolbox hex file with PSoC Programmer. ModusToolbox hex file is not compatible with PSoC Programmer and you need to use Cypress Programmer

                   

                  Yes I am using a custom board. Not all of the power rails are decoupled and there are some power inputs that have the incorrect capacitance on them.

                  Please ensure that your design is aligned with all the guidelines in the PSoC 6 Hardware Design Considerations document. Failure to abide by these guidelines often cause programming issues and hardware initialization failures. The programming failure issue that you are facing might be because of the same reason.

                   

                  Thanks and Regards,

                  Rakshith M B