VBUS not switching to other power profile voltage

Announcements

Live Webinar: USB-C adoption. Simple & Cost-efficient solutions | April 18th @9am or 5pm CEST. Register now !

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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

0 Likes
1 Solution
Anonymous
Not applicable

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

View solution in original post

0 Likes
23 Replies
ShifangZ_26
Moderator
Moderator
Moderator
10 likes given 250 sign-ins 1000 replies posted

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

0 Likes
Anonymous
Not applicable

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

0 Likes

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

0 Likes
Anonymous
Not applicable

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

0 Likes

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

0 Likes
Anonymous
Not applicable

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

0 Likes
RajathB_01
Moderator
Moderator
Moderator
250 replies posted 100 replies posted 50 replies posted

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

0 Likes
Anonymous
Not applicable

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

0 Likes
RajathB_01
Moderator
Moderator
Moderator
250 replies posted 100 replies posted 50 replies posted

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

0 Likes
RajathB_01
Moderator
Moderator
Moderator
250 replies posted 100 replies posted 50 replies posted

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

0 Likes
Anonymous
Not applicable

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

0 Likes
RajathB_01
Moderator
Moderator
Moderator
250 replies posted 100 replies posted 50 replies posted

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

0 Likes
Anonymous
Not applicable

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

0 Likes
RajathB_01
Moderator
Moderator
Moderator
250 replies posted 100 replies posted 50 replies posted

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

0 Likes
Anonymous
Not applicable

Hi Rajath,

The schematics which I shared is the initial release and I have slightly modified the schematics. I have added a 68K resistor in series with MOSFET gate and CCG2 pins 21 and 24, after which the CC1 and CC2 pins started toggling at ~40ms.

The reason why I asked about the 5V current requirement was to use a LDO instead of switching regulator. In the current schematics (The main project) we have a switching regulator which will provide up to 6A of current and the same has been connected to dual P channel, but when we are not drawing the current from switching regulator the operating current will be bit higher than the operating current of LDO. To reduce the input current drawn by the system in Ideal mode we are planning to use LDO to power dual p channel mosfet and switch off the switching regulator when the system in ideal mode.

We are continuously testing the board and the CCG didn't stop working. Once the CCCG stops working I will check the points you mentioned using oscilloscope and share you the pic.

Thanks,

Nagaraj

0 Likes
Anonymous
Not applicable

Hi Rajath,


Can you please let me know what should be the current capacity of the 5V poser supply which will be connected to 2-N channel FET.

Thanks,

Nagaraj

0 Likes
RajathB_01
Moderator
Moderator
Moderator
250 replies posted 100 replies posted 50 replies posted

Can you attach the modified schematic (Vbus switching part)?

I will go through and let you know.

Thanks,

Rajath

0 Likes
Anonymous
Not applicable

Hi Rajath,

I have already share the schematics with you (Share in one of the post).

In our application we are using a 5 V step down converter and when there is no load we are planning to turn off the step down converter, but in the current release if we turn off the step down converter, the CC lines will be switching at 3.3V (Also to save power) in the next release we are planning to add a LDO to power 2-N channel mosfet and the step down  converter will be turned on after some event.

For this reason I was asking what should be the current capacity required. Will a 5V/500mA LDO will be sufficient?

Thanks,

Nagaraj

0 Likes
Anonymous
Not applicable

Hi Rajath,

The CCG2 device stopped working and we have measured the below signals,

1. VBUS: 0V when no power adapter is connected. When power adapter is connected, the VBUS is toggling (5V and 0V).

2. VCCD: 1.8V

3. VDD, VDDIO: 3.38V

4. CC lines: 0V (Not toggling with ~40ms).

5. Xres: 3.38V

6. I2C lines: I2C lines are working with other device.

Please do let me know if you need more info. Please note all the reading are taken using oscilloscope.

Thanks,

Nagaraj

0 Likes
RajathB_01
Moderator
Moderator
Moderator
250 replies posted 100 replies posted 50 replies posted

Hi Nagaraj,

Do you have a Cypress's CCG EVK?

I am unable to localize the problem whether it is on the power adapter or notebook.

I recommend testing this if you have CCG EVK:

your CCG2 notebook <-----> CCGx EVK as power adapter

CCGx EVK as sink <------> your CCG2 power adapter

Try testing these two scenarios to test your two boards independently. Then it will be easier to debug what happens when connected mutually.

Regards,

Rajath

0 Likes
Anonymous
Not applicable

Hi Rajath,

We don't have EVK with us. One board we have configured as power adapter and another board we have configured as notebook application. This condition will come only in notebook application.

Is there any way we can check this without EVK?

Thanks,

Nagaraj

0 Likes
RajathB_01
Moderator
Moderator
Moderator
250 replies posted 100 replies posted 50 replies posted

Hi Nagaraj,

Can you please check again if Adapter is able to provide 12V after negotiation.

The race around in VBUS means something is wrong with the negotiated PDO and active PDO.

This will require CC log to debug. Please try to read the communication over CC using CY4500 protocol analyzer.

Only this will take us in the right direction.

Regards,

Rajath

0 Likes
Anonymous
Not applicable

Hi Rajath,

    

we don't have CY4500 protocol analyzer to debug the CC pins.

0 Likes