11 Replies Latest reply on Jun 29, 2018 8:05 AM by stkuc_3208431

    Sample configuration for CYPD3120

      Hi.  I am developing a handheld instrument that has a battery in it.  The battery is to be charged by a Type-C USB charger.  I use a CYPD3120.  It just has to negotiate 5V/3A, 9V/3A, 12V/3A, 15V/3A, 20V/3A (or, more or less any voltage and any amperage).  NOTHING ELSE.  Is there somewhere an example configuration for this really basic application? I have never used this family of chips and I am feeling overwhelmed with all the possibilities and options that I do not want to explore.

      Also, can I just call it a firmware update and download it directly to the device that is already on the PCB?

      Thanks a lot.

      Steve

        • 1. Re: Sample configuration for CYPD3120
          RajathB_01

          Hi Steve,

           

          Have you already implemented a CYPD3120 on the PCBs?

           

          Using CYPD3120 for this application requires firmware modification. If you don't want to modify the firmware (stick to default firmware), you can use CYPD3121 which comes with default powerbank firmware.

          If you just need to charge the battery, you can omit the power provider path (and type A receptacle) in the circuit and use the EZ-PD Configuration Utility to set only the power sink profiles. You can refer to this application example in page-18 of the CCG3 datasheet. Reference design can be found here.

           

          If you want to stick to CYPD3120 then you will have to include Vbus FETs in the circuitry and modify the firmware to generate Vbus FET control signals.

           

          Regards,

          Rajath

          1 of 1 people found this helpful
          • 2. Re: Sample configuration for CYPD3120

            Hi Rajath;

            Thanks for the fast reply

             

            Yes, I already have the 3120 on the PCB (based on a suggestion from the distributor's technical team).

            My battery charger is on another board, so with this chip I just have to provide input power.  I hope that then I can avoid the FETs.

             

            Since I am in a time crunch, and the PCBs arrived late, I would prefer to keep the 3120 because the 3121 is presently not in stock anywhere, with a 13 week waiting period.  (If you know where I can buy 100 CYPD3121 chips with a 1-2 day delivery, I will have the other chips replaced, however, I would rather not.)

             

            The only thing I want to do with this chip is to tell a smart charger to send me, if possible, 20V/2.25A, or 15V/3A, or 9V/3A or 5V/3A.

             

            So:

            1) Is there a sample configuration file for this (that I can modify)? - can I just get a copy the default 3121 firmware?

            2) Can I download it directly from a PC Type A port to the Type C on my PCB?

            3) Is somewhere a step-by-step instruction on what to do and how to do it?

             

            I would greatly appreciate your help because this is a one at a time task for me, and I would prefer not to become an expert in CCG3 firmware in order to make my smart charger deliver power to my instrument. Here my electrical diagram.  POWER_IN & GND_IN go to a overvoltage protection module and if everything is fine, then the voltage goes through to BAT_CHRG_PWR & GND.  These go to another PCB.  For the time being, let's forget P1.1 & P1.2.  That's it.

             

            Thanks a lot,

            Steve

             

            • 3. Re: Sample configuration for CYPD3120
              RajathB_01

              Hi Steve,

               

              So I learn it is impossible for you to make hardware changes now.

              I looked at your current configuration and I think it should work fine. The only reason I would put a FET switch inline between Vbus and the battery charger would be to let the CYPD3120 decide when it would like to allow power to the battery board. Since you are only sinking power, It'll just act as a protection feature which you can choose to omit. Just make sure the battery charger unit does not 'drive back' Vbus.

               

              Regarding the firmware, you can use the default firmware for CYPD3120 without modifying if you exclude FETs. Then you have to configure the power sink profiles using the EZ-PD configuration Utility. You will have to do firmware update over USB using D+/- lines. I have attached the 3 different ways you can perform firmware update.

              Refer these if you are new to the configuration utility:

              EZ-PD Configuration Utility

              How to use EZ-PD utility

               

              Best regards,

              Rajath

              1 of 1 people found this helpful
              • 4. Re: Sample configuration for CYPD3120

                Hi Rajath;

                There is a lot of progress.  I managed to reprogram a few boards, and now, my smart charger is by default giving me the 15V that I want.

                 

                YEAHHHHHH !!!!

                 

                I messed up the first board, and I tried to reprogram it several times, and now it is always giving me 0V.  Do you have an idea what to do to?

                I am using Option#2 for programming: Type A to Type C.

                 

                Anyways, thanks a lot for your help

                 

                A+

                 

                Steve

                • 5. Re: Sample configuration for CYPD3120
                  RajathB_01

                  Hi Steve,

                   

                  Can you elaborate on what you actually 'messed up'? Did you change the default 5 V power profile?

                  Try flashing the stock firmware (attached) and flash both firmware images on the CCG3.

                  Let's see if this brings the dead board back to life.

                   

                  Regards,

                  Rajath

                  • 6. Re: Sample configuration for CYPD3120

                    Hi Rajath again;

                    I mastered the art of simple reprogramming the CYPD3120 (a baby-step) !!!

                    The last problem went away. I programmed it - thanks for the stock firmware.

                     

                    Thanks for your help.  I hope that this part of the project is fine.

                     

                    You provided me with great help.

                     

                    Best,

                     

                    Steve

                     

                    P.S. I attached a little document where I described the steps needed to follow in order to reconfigure the CYPD3120 from your computer without any interface boards.  Hope this will help a total novice.  Good luck.

                    • 7. Re: Sample configuration for CYPD3120

                      Hello again;

                      Now, the charger is perfect.

                      However, if I connect my instrument to a computer (not to a smart charger), I would like to use the USB lines to communicate, and I cannot.  It seems like the CYPD3120 is constantly chatting with my computer, and my processor cannot communicate. This is the USB signal pattern that I keep getting:

                       

                      If I try to connect  to my instrument, I am getting the following error (Scion is the name of my instrument):

                      Is there something in the configuration that I have to set to make this possible? Or do I have to do some hardware modifications?  I just connected the D+, D-, +5V and GND signals to the USB port of the processor.  The communication works if I disconnect the CYPD3120 pins from D+ & D- lines.

                       

                      Thanks a lot,

                      Steve

                      • 8. Re: Sample configuration for CYPD3120
                        RajathB_01

                        Hi Steve,

                         

                        The CYPD3120 uses the D+/- lines for firmware update. Hence you cannot signal on the D+/- lines without disconnecting the CYPD.

                        What you can do is implement a mux to switch the 2.0 lines between the CYPD and your processor in the instrument.

                         

                         

                        Best regards,

                        Rajath

                        • 9. Re: Sample configuration for CYPD3120

                          Hello Rajath;

                          Thanks for the fast answer.

                          I can put DIP switches to connect the D+/- lines to the CYPD during the configuration modification ("factory customization"). After that I can disconnect the CYPD.  However, will the power negotiation with the power supply still function?

                          Is there another chip that can do both: being programmed via USB type C connector to request 15V/3A from a charger (nothing else), and do not interfere with USB communications?

                          Steve

                          • 10. Re: Sample configuration for CYPD3120
                            RajathB_01

                            Hello Steve,

                             

                            Power negotiation will still happen without the D+/- lines connected to the CYPD3120. You can certainly use a DIP switch and factory program it.

                             

                            Regarding other chips that support programming via the Type-C port and still leave the D+/- lines untouched, you have to look for CCG's that support 'CC bootloader'. For this, the EZ-PD config utility makes use of CC lines for programming. Hence clearly you will have to use a PC with type-c port, or, a CY45XX EVK board to program (see the bootloader options I attached in one of the previous posts).

                             

                            The CCG3 series does not have a chip that is CC bootloadable and works as UFP.

                            CCG2 series has few chips that act as UFP and can support CC bootloader.

                             

                            So if you can change the hardware and have the necessary components for CC bootloading, you can switch to CCG2.

                            Otherwise, you can switch between CYPD and processor while programming/communicating and retain the chip as it is now.

                             

                             

                            Regards,

                            Rajath

                            1 of 1 people found this helpful