1 2 Previous Next 23 Replies Latest reply on Jul 27, 2018 4:17 AM by nahc_3161346

    VBUS not switching to other power profile voltage

      Hi,

          we using CYPD2134-24LQXI_power_adapter and CYPD2122-24LQXI_notebook example code, we added power profile Source PDO 5V@3A,12@3A in power_adapter config file and Source PD0 5V@3A, Sink PDO 5V@3A,12V@3A in notebook config file. we want to source the connected device with 12V@3A, Upon plugging the type C cable between notepad and power adapter the power adapter is not switching to 12V.

      Please do let me know if you need more info.

       

       

       

      Thanks,

      Nagaraj

        • 1. Re: VBUS not switching to other power profile voltage
          ShifangZ_26

          Hi Nagaraj,

           

          1. May I know whether you have got SOURCE_CAP advertise on CC line or not? (This question is based on CYPD2134 connect to CYPD2122). If yes, whether CYPD2122 have been request 12V voltage or not? If no, you need refer item#2.

          2. If there is not any CC negotiation on CC attached status. Please check CYPD2134 and CYPD2122 separately. 

          >> CYPD2134, it is expected CC1 and CC2 is high to ~4.0V.

          >> CYPD2122. It is expected CC1 and CC2 is togged with time interval about 40ms.

          >> When two Type-C receptacle connected via Type-C cable, one of CC1 and CC2 shall have a ~1.68V (or 0.9V, or 0.45V) divide voltage value.

          3. With the correct divide voltage on CC line, we can looking for SOURCE_CAP on CC line. If there is not any advertise, please kindly check hardware related CC1 and CC2.

           

          Best Regards,

          Lisa

          • 2. Re: VBUS not switching to other power profile voltage

            Hi Lisa,

             

            Our hardware is designed with CYPD2122-24LQXI and we are using CYPD2134-24LQXI_power_adapter application to test the notebook application.

             

            When the type c notebook hardware is not connected, the CC1 and CC2 lines are pulled high ~5V. In the notebook hardware the CC lines are toggling at interval of 40ms. We have checked the CC lines and the cable/notebook hardware is plugged to the power adapter hardware and there is some communication happening between them (We are not able to decode the data as we are not aware of the format).

             

            We checked the register for the which PDOs are used by the CCG device and PDO0(5V) and PDO1(12V) are enabled as we have configured the same using configuration tool.

             

            In debug mode when we checked the code the "switch (volt_50mV)" was switching from 5V to 12V but the CCG device was not driving the VSEL respective pins. We have read the PD Contract Negotiation Complete register in Notebook application but none of the bit is getting set.

             

            Please do let me know if we have to modify the code and if more info is required.

             

            Thanks,

            Nagaraj

            • 3. Re: VBUS not switching to other power profile voltage
              ShifangZ_26

              Hi Nagaraj,

               

              Great. If so, May I know whether you have been customized function bool set_psrc_voltage(uint16_t volt_50mV) @ file psource.c as per your project?

               

              You may noticed that Orignal firmware code only includes 5V, 9V, 15V, and 20V. In your CYPD2134 project, hope you have add one case under switch (volt_50mV) simillar as below:

                      case VBUS_12V:   

                          VSEL1_Write(xxxx);

                          VSEL2_Write(xxxxx);

                          break;

               

              Best Regards,

              Lisa

              • 4. Re: VBUS not switching to other power profile voltage

                Hi Lisa,

                 

                We have added the below code to set for 12V,

                bool set_psrc_voltage(uint16_t volt_50mV)

                {  

                #ifdef PD_APP_POWER_ADAPTER_INC

                    int8_t wait_thresh = 0;

                    bool wait_direction = false;

                    sol.psrc_volt = volt_50mV ;

                   

                #ifdef OVP_OCP_SUPPORTED_INC

                    /** Disable OVP/OCP */

                    ovp_ocp_otp_disable(); 

                #endif /*OVP_OCP_SUPPORTED_INC*/

                   

                    if(sol.psrc_volt_old > sol.psrc_volt)

                    {

                        /* Turn on discharge circuit */

                        VBUS_DISCHARGE_Write(1);

                    }

                    switch (volt_50mV)

                    {

                        case V_SAFE_5V:

                            VSEL1_Write(0);

                            VSEL2_Write(0);

                            break;

                      /* case VBUS_9V:   

                            VSEL1_Write(0);

                            VSEL2_Write(1);

                            break;*/

                        case VBUS_12V:   

                            VSEL1_Write(1);

                            VSEL2_Write(0);

                            break;

                        case VBUS_20V:

                            VSEL1_Write(1);

                            VSEL2_Write(1);

                            break;

                 

                Still the VSEL (Vsel2 -P1[0] and Vsel1 -P1[3]) pins are not getting set. In the configuration the drive mode is selected as strong drive and the initial drive state is LOW for both VSEL pins.

                 

                We tested the hardware by making one of the VSEL pin initial drive state to high and that time the hardware was able to set 12V (without connecting consumer and type C cable).

                 

                The power adapter application was for CYPD2134 controller, we have changed to CYPD2122 but still the voltage is set to 5V and the VSEL pins are in low state after negotiation.

                 

                Thanks,

                Nagaraj

                • 5. Re: VBUS not switching to other power profile voltage
                  RajathB_01

                  Hi Nagaraj,

                   

                  Are you able to successfully switch to other profiles 9V and 20V?

                  Have you tried GPIO's other than default ones in the firmware, for generating VSEL1 and VSEL2?

                   

                   

                  Regards,

                  Rajath

                  • 6. Re: VBUS not switching to other power profile voltage
                    ShifangZ_26

                    Hi Nagaraj,

                     

                    1. Since you only observed 5V on VBUS finally, you will only got VSEL1/2 output to 0. Since the contract is completed, the latest contract is 5V.

                     

                    2. If you could like to debug this issue. I could like to recommend you further details measure on VBUS and VSEL1/2. If you have PD protocol analyzer will be better (For example, Cypress CY4500 Kit can help you) . So that we can know whether it is any failure on 12V voltage contract.

                     

                    3. From your description, you said the firmware have been run 12V case. CCG2 is not only go there to set voltage. You knew there are many timer inside of firmware, VBUS_MON will be work after this action.

                     

                    Please share details waveform and CC communication log to us to further debug.

                     

                    Best Regards,

                    Lisa

                    • 7. Re: VBUS not switching to other power profile voltage

                      Hi Lisa,

                       

                      Thanks for your help.

                       

                      Now the adapter is able to provide 12V and notebook application is also sinking 12V. We are not sure why the adapter application was not setting the VSEL 1 and VSEL 2 pins for the appropriate voltage.

                       

                      We re-flashed the board and the adapter application started working for the 12V source.

                       

                      While testing we found that when we remove the type C cable and reinsert (Removing and reinserting continuously), sometimes the adapter will not source 5V and sometime the notebook application will not accept the profiles and will not enable the consumer path. When we reset both notebook and adapter board the app will work till the time we remove the type C cable and reinsert again (This is random).

                       

                      We checked the CC lines in both notebook and adapter and the CC lines are toggling in notebook board and in adapter board the CC lines are pulled high.

                       

                      We would like to know what was the cause for this issue.

                       

                      The notebook board and power adapter board are working with one particular type C cable (Might be EMCA cable). Now, will the notebook and power adapter application works with non EMCA cables? Also the communication on the CC pins happens in one particular orientation of CC pins. when the cable orientation changes, the boards are not detecting the cable and responds with detached.

                       

                      Please do let me know if you need more info.

                       

                      Thanks,

                      Nagaraj

                      • 8. Re: VBUS not switching to other power profile voltage
                        RajathB_01

                        Hi Nagaraj,

                         

                        Can you please share the CC log if you are using the CY4500 analyzer? That will be very helpful.

                        Otherwise, schematic and/or project details maybe required to debug this issue.

                         

                        Best regards,

                        Rajath

                        • 9. Re: VBUS not switching to other power profile voltage

                          Hi Rajath/Lisa,

                           

                          We don't have CY4500 analyzer. The adapter was not switching the VBUS voltage to 12V initially and when we re-flashed the board again with same application then the adapter board started switching the VBUS to 12V.

                           

                          We are facing another issue, the CYPD2122 with notebook application stops working, CC lines will not toggling at ~40ms  and I2C won't respond, in this case we have to re-flash the controller and then it starts working.

                           

                          We would like to know the cause for this behavior.

                           

                          Note: We have not changed any code in the CYPD2122 notebook application which we got while we installed the SDK.

                           

                          Thanks,

                          Nagaraj

                          • 10. Re: VBUS not switching to other power profile voltage
                            RajathB_01

                            Hello Nagaraj,

                             

                            1) At what point of time does it stop working? Is there a time period, or, some cable disconnect - connect action, or, power cycle or anything after which you observe this?

                             

                            2) What do you mean by I2C doesnt respond? Are you talking about HPI interface?

                             

                            3) If you are not following the application diagram as on CCG2 datasheet, please see if you can provide your schematic, it will be very helpful.

                             

                            4) Can you please measure the voltage at these points when it stops working: (oscilloscope traces would be even better)

                            • VBUS
                            • Both CC lines
                            • VDDD, VCCD and VDDIO
                            • I2C_SDA, I2C_SCL, XRES

                             

                            Best regards,

                            Rajath

                            • 11. Re: VBUS not switching to other power profile voltage

                              Hi Rajath,

                               

                              1. We are not sure about the condition. There is no time period and some times it happened when we connect and disconnect the cable from the power adapter.

                              2. We are talking about HPI (interfaced through I2C)

                              3. When the CCG stops working we will measure the voltage at the the specified points and get back to you.

                               

                              I have attached the schematics of the CCG2 controller which is used for notebook and power adapter application.

                               

                              Thanks,

                              Nagaraj

                               

                              Capture.PNG

                              • 12. Re: VBUS not switching to other power profile voltage
                                RajathB_01

                                Hi Nagaraj,

                                 

                                Two things I observed in your schematic:

                                1. Vsel lines are being taken from CCG pins 10 and 13 (Am I right?). Pins 10 and 13 on the default CYPD2122 SDK firmware is used for I2C communication with the alternate mode mux. You have to modify the SDK to generate Vsel signals from different pins. I suggest you use the SWD pins (11 and 12) for Vsel since they serve as GPIO's when not in programming mode.
                                2. VDDIO is connected to 3V3. Its is recommended to use 5V5 for VDDIO.

                                 

                                The measured voltages / oscilloscope traces can further corner the issue.

                                 

                                Best regards,

                                Rajath

                                • 13. Re: VBUS not switching to other power profile voltage

                                  Hi Rajath,

                                   

                                  I. Yes, you are correct. We are using pin 10 and 13 for VSEL lines and we have modified the firmware to use these pins as GPIO.

                                   

                                  II. VDDIO is supply pin for GPIO's and as per the datasheet we can power with 1.71V to 5.5V.

                                   

                                  Can you please let me what should be the current capacity of the 5V supply which will be connected to the dual P- channel MOSFET?

                                   

                                  Thanks,

                                  Nagaraj

                                   

                                  Capture1.PNGCapture2.PNG

                                  • 14. Re: VBUS not switching to other power profile voltage
                                    RajathB_01

                                    Hi Nagaraj,

                                     

                                    CCG2 has no problem driving GPIOs at 3.3V; I was concerned about the FETs being switched. The current capacity of 5V5 supply will depend on the components used in the end application. From your schematic, the 5V supply seems to source upto 6A. That should be more than enough for typical applications with CCGs.

                                     

                                    More debugging can be done after analyzing the traces at the requested points.

                                     

                                    Regards,

                                    Rajath

                                    1 2 Previous Next