Active Power Identification with Multiple PDOs

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
Raro_2284361
Level 3
Level 3
First like received

We have built a CCG3PA product that has multiple power options ie: 24/45/60watt output and all advertised PDOs have to change accordingly

We are currently shipping these and require programming of each specific power profile using Config Utility (painfull)

What we are after is a Active Trigger to the spare  GPIO on the CCG3PA to set different Power tables (PDOs) based on HI/Low/open reading

So the main question is how do we store multiple PDO tables and be able to retrieve them for advertisement when specific GPIO pin is used as input parameter

Thank You

0 Likes
1 Solution
HirotakaT_91
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

Hi,

It is possible to change PDO dynamically by issuing GPIO interrupt.

dpm_update_src_cap() will be helpful for you.

I will put an example to carry out such a behavior as follows. This snippet can apply to main.c with some changes.

An example for changing PDO dynamically on the CCG3PA Firmware.

void change_pdos(void)

{

  pd_do_t SRC_PDO[4];

    if ( //read pin status register somewhat way == false)

    {

        SRC_PDO[0].val = 0x0001912C; //5V 3A (This value can check on xml file created by EZ-PD Configuration Utility)

        SRC_PDO[1].val = 0x0002D0D2; //9V 2.1A

        SRC_PDO[2].val = 0x0004B12C; //15V 3A

        SRC_PDO[3].val = 0x0006412C; //20V 3A

     

        dpm_update_src_cap(0, 4, SRC_PDO);

        dpm_update_src_cap_mask (0, 0x0F);

        dpm_pd_command (0, DPM_CMD_SRC_CAP_CHNG, NULL,NULL); //Send PD command about the changes in source capabilities

    }

}

CY_ISR(GPIO_ISR_handler)

{

    //clear any active interrupts on corresponds pin for interrupt

    change_pdos();

}

Also, hopefully, "EZ-PD CCGx Power SDK User Guide.pdf" on EZ-PD CCGx Power Software Development Kit page will help you.

Best regards,

Hirotaka Takayama

View solution in original post

2 Replies
HirotakaT_91
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

Hi,

It is possible to change PDO dynamically by issuing GPIO interrupt.

dpm_update_src_cap() will be helpful for you.

I will put an example to carry out such a behavior as follows. This snippet can apply to main.c with some changes.

An example for changing PDO dynamically on the CCG3PA Firmware.

void change_pdos(void)

{

  pd_do_t SRC_PDO[4];

    if ( //read pin status register somewhat way == false)

    {

        SRC_PDO[0].val = 0x0001912C; //5V 3A (This value can check on xml file created by EZ-PD Configuration Utility)

        SRC_PDO[1].val = 0x0002D0D2; //9V 2.1A

        SRC_PDO[2].val = 0x0004B12C; //15V 3A

        SRC_PDO[3].val = 0x0006412C; //20V 3A

     

        dpm_update_src_cap(0, 4, SRC_PDO);

        dpm_update_src_cap_mask (0, 0x0F);

        dpm_pd_command (0, DPM_CMD_SRC_CAP_CHNG, NULL,NULL); //Send PD command about the changes in source capabilities

    }

}

CY_ISR(GPIO_ISR_handler)

{

    //clear any active interrupts on corresponds pin for interrupt

    change_pdos();

}

Also, hopefully, "EZ-PD CCGx Power SDK User Guide.pdf" on EZ-PD CCGx Power Software Development Kit page will help you.

Best regards,

Hirotaka Takayama

This is very helpful , thank you so much..

We will try it ASAP

Sent from Rads iPhone

0 Likes