PPS Request for specific 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
RaRo_1233086
Level 3
Level 3
First like received 10 sign-ins 5 sign-ins

We are in need of a simple single voltage PPS request for CYPD3171 SDK 3.3 , our customer has an 11V requirement on his device and the power adapter that he will be using is USB PD certified and yes it has  3.3 - 21.5V PD 3 and PPS 3A capability

we need a simple solution he could load into his 3171 based SINK project to output 11V at 3A

0 Likes
1 Solution

Hi Rad,

I take a chance to made a very simple test firmware on CY4532 for PPS request.  And then, tested with ZIMI power adapter, test results shows that the PPS request could send out successful.

The process is below:

  1. enable APP_PPS_SINK_SUPPORT macro.
  2. Comments out hpi_set_userdef_write_handler (hpi_user_reg_handler) and uint8_t hpi_user_reg_handler(uint16_t addr, uint8_t size, uint8_t *data). Since CCG3PA SDK do not have includes HPI lib.
  3. Create a function with similar implementation as hpi_user_reg_handler() to load the required RDO values. The required RDO value need fill below value for PPS RDO. My function is for your reference.

     ---------------------------------------------------------------------------------------------------------------------------

void pps_request_handler(uint8_t port, uint32_t voltage, uint32_t current)

{

    int8_t i;

    const dpm_status_t *dpm_stat;

   pd_do_t pps_request;

   

    dpm_stat = dpm_get_info (TYPEC_PORT_0_IDX);   

   

    for(i = receive_src_pdo_count; i >= 0; i--)

    {

        if(receive_src_pdo.fixed_src.supply_type == PDO_AUGMENTED)

        {

            if((receive_src_pdo.pps_src.max_volt * 100 >= voltage) &&

                        (receive_src_pdo.pps_src.min_volt * 100 <= voltage))

            {

                pps_request.val = 0;

                pps_request.rdo_pps.obj_pos = i+1;

                pps_request.rdo_pps.out_volt = voltage/20;

               

                if(receive_src_pdo.pps_src.max_cur * 50 >= current)

                {

                    pps_request.rdo_pps.op_cur = current/50;

                    pps_request.rdo_pps.cap_mismatch = false;

                }

                else

                {

                    pps_request.rdo_pps.op_cur = receive_src_pdo.pps_src.max_cur;

                    pps_request.rdo_pps.cap_mismatch = true;               

                }

                pd_pps_flag = true;

               

                break;

            }

        }

    }   

    /* Operation is only valid if we are a sink and PD contract exists. */

    if ((dpm_stat->contract_exist != 0) && (dpm_stat->cur_port_role == PRT_ROLE_SINK) &&

            (dpm_stat->spec_rev_sop_live >= PD_REV3))

    {

        app_prog_rdo[port]   = pps_request;

        app_pps_snk_en[port] = true;

         /* Start a timer which will start re-negotiation so that PPS source can be selected. */

        timer_start (port, 0x91, 1, snk_recontract_timer_cb);

    }

}

     ------------------------------------------------------------------------------------------------------------------------------------------------------

Best Regards,

Lisa

View solution in original post

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

Hi Rad,

Currently, SDK 3.3 lib is not support PPS request. If you need use SDK project to send a PPS request, the best option is CCG5.

Best Regards,

Lisa

0 Likes

Thank YOU, can you share info on how to use the CCG5 to make a PPS specific voltage request

Rad

0 Likes

Hi Rad,

I take a chance to made a very simple test firmware on CY4532 for PPS request.  And then, tested with ZIMI power adapter, test results shows that the PPS request could send out successful.

The process is below:

  1. enable APP_PPS_SINK_SUPPORT macro.
  2. Comments out hpi_set_userdef_write_handler (hpi_user_reg_handler) and uint8_t hpi_user_reg_handler(uint16_t addr, uint8_t size, uint8_t *data). Since CCG3PA SDK do not have includes HPI lib.
  3. Create a function with similar implementation as hpi_user_reg_handler() to load the required RDO values. The required RDO value need fill below value for PPS RDO. My function is for your reference.

     ---------------------------------------------------------------------------------------------------------------------------

void pps_request_handler(uint8_t port, uint32_t voltage, uint32_t current)

{

    int8_t i;

    const dpm_status_t *dpm_stat;

   pd_do_t pps_request;

   

    dpm_stat = dpm_get_info (TYPEC_PORT_0_IDX);   

   

    for(i = receive_src_pdo_count; i >= 0; i--)

    {

        if(receive_src_pdo.fixed_src.supply_type == PDO_AUGMENTED)

        {

            if((receive_src_pdo.pps_src.max_volt * 100 >= voltage) &&

                        (receive_src_pdo.pps_src.min_volt * 100 <= voltage))

            {

                pps_request.val = 0;

                pps_request.rdo_pps.obj_pos = i+1;

                pps_request.rdo_pps.out_volt = voltage/20;

               

                if(receive_src_pdo.pps_src.max_cur * 50 >= current)

                {

                    pps_request.rdo_pps.op_cur = current/50;

                    pps_request.rdo_pps.cap_mismatch = false;

                }

                else

                {

                    pps_request.rdo_pps.op_cur = receive_src_pdo.pps_src.max_cur;

                    pps_request.rdo_pps.cap_mismatch = true;               

                }

                pd_pps_flag = true;

               

                break;

            }

        }

    }   

    /* Operation is only valid if we are a sink and PD contract exists. */

    if ((dpm_stat->contract_exist != 0) && (dpm_stat->cur_port_role == PRT_ROLE_SINK) &&

            (dpm_stat->spec_rev_sop_live >= PD_REV3))

    {

        app_prog_rdo[port]   = pps_request;

        app_pps_snk_en[port] = true;

         /* Start a timer which will start re-negotiation so that PPS source can be selected. */

        timer_start (port, 0x91, 1, snk_recontract_timer_cb);

    }

}

     ------------------------------------------------------------------------------------------------------------------------------------------------------

Best Regards,

Lisa

0 Likes