1 2 Previous Next 23 Replies Latest reply on Jan 28, 2019 5:25 AM by niprc_3742601





      my understanding is that KitProg is firmware that runs on PSoC5 and is used to program a PSoC4 processor on the same board.  At least, this is how it appears to be set up on my PSoC 4 L-Series Pioneer Kit (CYCKIT-046).


      Is it possible to configure/modify KitProg such that it can program more than one PSoC4 chips on our custom board?  I am thinking about configuring/adding some sort of a switch that I could point to a selected chip that I want to program.  Or some sort of "broadcast" option, maybe, where I can program all PSoC4 chips at once.


      Please help!




        • 1. Re: KitProg

          Hi Nikolay,


          Presently, Kitrprog supports SWD mode of Programming and it can't program multiple PSoCs at  a given time.

          • 2. Re: KitProg



            and thank you for your reply!

            As you mentioned, I haven't being able to find any reference on how to program multiple PSoC chips.  I wonder if there is absolutely anything in my power that I can do to make it work.  The only thing that I can think of right now is, somehow, modify KitProg so it switches to different SWD pins to program different PSoC processors.  Is this possible to do?


            Also, I found this document, PSoC4 Programming Using an External Microcontroller (HSSP) (AN84858) that talks about how to program a PSoC.  It references the code from 001-84858_AN84858.zip file that handles PSoC programming.  My understanding is that this is the KitProg code.  My problem is that I am new to PSoC programming as well as microcontroller programming in general, I don't even have much of embedded programming experience either.  I would really appreciate any tips or general guidelines that would help me to accomplish this task OR, maybe, find somebody who could do this.


            Thanks again,


            • 3. Re: KitProg



              Following is my "idea" and unfortunately I have not been able to test it.

              So please read with a grain of salt.


              Skimming some web pages for SWD,

              I suppose that SWCLK is output from KitProg

              and SWDIO is in/out from KitProg.

              So I'd think controlling SWDIO might be difficult

              and probably controlling only SWCLK (I hope) should work.


              So if you go with jumper(s) or switch(es) the schematic could be like

              (Pin Numbers may be incorrect, only refer to the signal names)



              Or if you have enough courage, you could implement a circuit in one of the PSoC 4 or

              add another PSoC (or FPGA) for this task.


              But probably the earlier (jumper/switch) method is cheaper and safer.



              • 4. Re: KitProg

                Kitprog's firmware is confidential, it's not available in any ANs presently.

                • 5. Re: KitProg

                  Thanks again!

                  Do you know the difference in functionality between PSoC4 Programming Using an External Microcontroller (HSSP) (AN84858) and KitProg?  To me, they appear to do the same thing.  AN84858 (page13) talks about loading their HSSP project (B_Hssp_Pioneer.cyacd) on a PSoC 5LP to program a PSoC4 processor.  This is what KitProg does in my understanding.


                  Thank you for your help!


                  • 6. Re: KitProg

                    Hello, and thanks again for your help!


                    I like your ideas.  My understanding, that in your first proposal, we would have to physically control the switches to change between the processors to program.  If so then, it may not work since we may not always have physical access to our board.

                    Your second proposal is somewhat what I had in mind, but with a few missing details.  I will talk to my hardware engineer team to see if it would be possible to add a PSoC5 connected to my master PSoC with signal control logic.  You implied that this approach is less safer.  My I ask you why do you think so?


                    Thank you very much!


                    • 7. Re: KitProg


                      Maybe instead of 4 of PSOC4 processors you can use one PSoC5? What limitations are forcing to use array of 4?


                      • 8. Re: KitProg



                        it is a better question for my hardware engineer team.  However my understanding is that a large number of pins that that we try to control and redundancy of the overall design are major drivers to use multiple PSoC processors.




                        • 9. Re: KitProg

                          Dear Nikolay-san,


                          First of all, I like the idea of /odissey1-san, if you can afford to use PSoC 5,

                          it has JTAG and multiple devices can be programmed through a single debug connection.


                          Having written above, I've been thinking/hoping that a PSoC can forward SWDCLK to other PSoC,

                          then we may be able to program multiple devices via single SWD connection.

                          Note: As I wanted to test this physically, after a round trip to Akihabara I asked my hardware colleague to make a prototype joint board, but it won't be done today, so currently following is only a desk theory.


                          Currently I'm considering a couple of plans


                          (1) Plan_01

                          Dedicate a PSoC4 to control which device to be programmed and select the device via UART.


                          For both plans I'll use hello_devicex for each child PSoC 4

                          and for Plan_01 I'll use swd_test project for PSoC 4 No.0 to select the destination.




                          (2) Plan_02

                          Use a PSoC 4 directly connected to SWD (let's call this a parent device) as a controller and download fixed SWDCLK - SWDCLK_OUTx circuit for each PSoC 4 connected after the first one (let's call them children devices).

                          Note: This method was what I thought may be not safe, as after writing all children device,

                          we also can write application to this parent device,

                          but without careful plan/design, this may cause the board bricked.


                          For Plan_02 I'll down load prog_devx for each child PSoC 4 then

                          indirectly program each of them.





                          Although I'm going to test them as soon as the joint board will be made,

                          in case the SWDCLK forwarding does not work, all of my plan will be a fantasy.

                          Let's keep our fingers crossed ;-)


                          Best Regards,


                          Motoo Tanaka

                          • 10. Re: KitProg

                            Dear Motoo-san,


                            thank you for your help!  I shared your ideas with my hardware engineer and here is what he said:



                            First of all, I like the idea of /odissey1-san, if you can afford to use PSoC 5,

                            it has JTAG and multiple devices can be programmed through a single debug connection.


                            I was told that PSoC5 doesn't have GPIO pins (or, maybe, not enough of them).  So it cannot suit our requirements.


                            2.  Routing SWDCLK line through a PSoC may introduce some lag for this signal and this lag may corrupt the bus.  So it would be better to route all of the SWD signals through a parent PSoC.  Here is how we altered your plan 2:




                            The plan is to use MiniProg3 to generate the PSoC programming instructions that are going to be rerouted to a specified child by the parent PSoC the same way you reroute SWDCLK signal in your scenarios.  To select the child to be programmed, I send a USB command from the workstation with the child's PSoC ID.  Mode Control is for putting the parent PSoC in the programming mode for the parent programming.  What do you think about our current design?  Do you see any problems with it?


                            Thank you so much for your help!


                            • 11. Re: KitProg

                              Dear Nikolay-san,


                              > 1.

                              > First of all, I like the idea of /odissey1-san, if you can afford to use PSoC 5,

                              > it has JTAG and multiple devices can be programmed through a single debug connection.


                              > I was told that PSoC5 doesn't have GPIO pins (or, maybe, not enough of them).  So it cannot suit our requirements.

                              I was assuming usage of multiple PSoC5s, as JTAG allows us to chain control of multiple devices.

                              (I'm afraid that the BOM cost will be very high though)


                              2. If you can synchronize SWDCLK and SWDIO, that will be ideal!

                                 And I also agree with the idea of using an external MiniProg3.

                                 I have been too lazy to really attack that trick, and gave up at the first glance of knowing that the signal is bidirectional.

                                 But I wonder if we can manage to handle both SWDCLK and SWDIO through two stages, Adapter and 5LP.

                                 In case you succeed to do this, would you please teach me(us) how you managed it?


                              Anyway, I'm going to play with my plan, too.

                              And let you know if it works or not when I know it.


                              Best Regards,


                              Motoo Tanaka




                              • 12. Re: KitProg

                                Dear Nikolay-san,


                                Today, our prototype did not behave as I expected.

                                Although we have not done enough testing and measuring

                                I suspect that SWDIO could not hold multi-drop connection.


                                So, yes, probably your engineer's idea will be better.


                                Best Regards,


                                Motoo Tanaka

                                • 13. Re: KitProg

                                  Dear Motoo-san,


                                  thank you so much for your help!

                                  Once we have our board ready for testing, I'll post here if it worked or not.


                                  And again, thank you for your help!


                                  • 14. Re: KitProg

                                    Dear Nikolay-san,


                                    Today, we had some success with my method.


                                    My problems were

                                    (1) USB was connected to the EVBs to use UART,

                                         but it caused SWD conflict with MiniProg3 and on-board kitProg

                                    (2) For the Device0 (which is supposed to forward clock),

                                         once clock forwarding program is written, nRESET from MiniProg3 must have been disconnected

                                         otherwise MiniProg3 will write program to Device0 again.


                                    So after programming Device0 for clock forwarding the circuit looks like



                                    With this and providing Vdd from external power supply we could program Device1 with clock forwarded via Device0.

                                    Note: At this point we had only Device0 and Device1 connected to MinProg3.



                                    Then we added another target board, so from the top to the bottom

                                    CY8CKIT-042 (only for providing power to other boards)

                                    CY8CKIT-042 as Device02

                                    CY8CKIT-042 as Device01

                                    CY8CKIT-042 ad Device00 (works as SWD_CLOCK_MUX)

                                    The board right side is only for FTDI (USB-UART) to communicate with Device00



                                    So what we did was

                                    (1) Program Device00 with swd_test_190110

                                    (2) connect MiniProg3, Device00, Device01, Device02 using a handmade cable.

                                    (3) clock_out_0 is connected to the SWD of Device01

                                    (4) clock_out_1 is connected to the SWD of Device02

                                    (5) The nRESET from MiniProg3 to Device00 is removed.

                                    (6) Using Device00 selected device01 (Ctrl = 0x01) and programmed Hello_Device1,

                                         which brinks Green_LED

                                    (7) Using Device00 selected device02 (Ctrl = 0x01) and programmed Hello_Device2,

                                         which brinks Red_LED

                                    (8) Both Device01 and Device02 were programmed OK.


                                    One of remaining issues is how to manage connect/disconnect of nRESET to Device00.


                                    Best Regards,


                                    Motoo Tanaka

                                    1 of 1 people found this helpful
                                    1 2 Previous Next