How to change CCG3PA project to have no feedback implementation?

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
JoLu_3455101
Level 4
Level 4
5 likes given 5 solutions authored 25 replies posted

Hi,

The default CCP3PA project (CY4532 EVK with CYPD3171 CLA implementation) uses direct feedback implementation. In the firmware, there's the following defines in config.h:

VBUS_CTRL_NONE                              (0)

VBUS_CTRL_PWM                                (1)

VBUS_CTRL_DIR_FB                            (2)

VBUS_CTRL_OPTO_FB                           (3)

VBUS_CTRL_TYPE_P1                           (VBUS_CTRL_DIR_FB)

My hardware doesn't use the CYPD3171's Feedback pin. I am using a GPIO to toggle between 2 voltage options (5V or 9V) from my external regulator. When I use VBUS_CTRL_NONE, my application doesn't work (or run) at all because it seems VBUS_CTRL_NONE is not really implemented. If I use VBUS_CTRL_DIR_FB, my 5V (default) option works, but with all the idac calculations in vbus_ctrl.c (which I think isn't necessary for my implementation), I cannot get my 9V option to work even after setting my GPIO pin. Hardware-wise, the GPIO pin did set, but my PD analyzer keep showing "hard reset" after a successful 9V negotiation over CC pin. Maybe I am missing something in the firmware. I tried commenting out some of the idac calculations code, but that didn't work.

Is it possible to implement a no feedback option?

Thanks,

Jonathan

0 Likes
1 Solution

Hi Lisa,

Thanks for your reply. I've did some digging and it appears that there was a timer in the feedback code that I needed for my no-feedback implementation. I have added it to my own function and it is working now.

I have a separate question related to the CY4532 EVK, but I will create a new topic on this.

Thanks,

Jonathan

View solution in original post

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

Hi Jonathan,

1. You can use VBUS_CTRL_DIR_FB and let FB and CATH is floating.

2. You mentioned that you have two GPIO toggle for 5V and 9V voltage setting, You just need add those into below functions.

static void psrc_select_voltage(uint8_t port)

You can get below contents have comment out.

        switch (app_stat->psrc_volt)

        {

            case VSAFE_9V:

                APP_VBUS_SET_9V_P1();

                break;

            case VSAFE_12V:

                APP_VBUS_SET_12V_P1();

                break;

            case VSAFE_13V:

                APP_VBUS_SET_13V_P1();

                break;

            case VSAFE_15V:

                APP_VBUS_SET_15V_P1();

                break;

            case VSAFE_19V:

                APP_VBUS_SET_19V_P1();

                break;

            case VSAFE_20V:

                APP_VBUS_SET_20V_P1();

                break;

            default:

                app_stat->psrc_volt = VSAFE_5V;

                APP_VBUS_SET_5V_P1();

                break;

        }

You can let them enable and add relates GPIO into

            case VSAFE_9V:

>>Add here

                break;

            case VSAFE_12V:

>> Add here

                break;

And clean others you do not need.

Best Regards,

Lisa

0 Likes

Hi Lisa,

Thanks for your reply. What you said makes sense so I tried it. In the function psrc_select_voltage of psource.c, I uncommented the case statements that I need. In order to activate that portion of the code, I had to undefine CCG_PROG_SOURCE_ENABLE (set to 0).

When I do that, the feedback function "APP_VBUS_SET_VOLT_P1(app_stat->psrc_volt);" is disabled/commented out, which is fine since I am not really using the built-in feedback circuitry.

However, when I plug in a phone into my CCG3PA now, no communication gets send by CCG3PA according to my Cypress PD Analyzer. My phone sends the PD message "Get_Source_Cap", but receives no reply from the CCG3PA controller (CYPD3171). So not even the 5V profile works.

It feels like there is some code within "APP_VBUS_SET_VOLT_P1" that I need, even though I don't need the direct feedback code. When I have the APP_VBUS_SET_VOLT_P1 function enabled (via define CCG_PROG_SOURCE_ENABLE 1), at least my 5V profile works and I see communication from CCG3PA on the CC signal. Only other voltages (i.e. 9V) didn't work because the firmware gets stuck somewhere and results in a hard reset.

Please let me know if you have an idea on what else I need when it comes to a no feedback implementation.

Thanks,

Jonathan

0 Likes

Hi Jonathan,

1. Please share your schematic in this threads to let us discuss in details. Since there are many misunderstanding to pending this.

2. As per your latest response, you are testing CCG3PA as Power sink, there is no relationship with FB. Please kindly notice that.

Best Regards,

Lisa

0 Likes

Hi Lisa,

Thanks for your reply. I've did some digging and it appears that there was a timer in the feedback code that I needed for my no-feedback implementation. I have added it to my own function and it is working now.

I have a separate question related to the CY4532 EVK, but I will create a new topic on this.

Thanks,

Jonathan

0 Likes