- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
- enable APP_PPS_SINK_SUPPORT macro.
- 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.
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank YOU, can you share info on how to use the CCG5 to make a PPS specific voltage request
Rad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
- enable APP_PPS_SINK_SUPPORT macro.
- 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.
- 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