cancel
Showing results for 
Search instead for 
Did you mean: 

USB EZ-PD Type-C

Anderson_Lin
New Contributor II

Hi All

CYPD3120-40LQXI change to DRP , How to modify FW ?

Attach HEX file : CYPD3120-40LQXI_dp_dongle.hex

0 Likes
1 Solution
YiZ_31
Moderator
Moderator

Hi,

You'll need to manually override the config table in the firmware.

Please check the following example code to change its power role to DRP and add source PDO:

dpm_update_port_config(0, 2, 0, 1, 2);

pd_do_t SRC_PDO[1];

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

dpm_update_src_cap(0, 1, SRC_PDO);

dpm_update_src_cap_mask (0, 0x01);

And you need to provide the corresponding power to the VBUS since it is a power source. External code is needed to control the power device like buck boost.

Regards,
Eddie

View solution in original post

0 Likes
3 Replies
YiZ_31
Moderator
Moderator

Hi,

You'll need to manually override the config table in the firmware.

Please check the following example code to change its power role to DRP and add source PDO:

dpm_update_port_config(0, 2, 0, 1, 2);

pd_do_t SRC_PDO[1];

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

dpm_update_src_cap(0, 1, SRC_PDO);

dpm_update_src_cap_mask (0, 0x01);

And you need to provide the corresponding power to the VBUS since it is a power source. External code is needed to control the power device like buck boost.

Regards,
Eddie

View solution in original post

0 Likes
Anderson_Lin
New Contributor II

Hi Eddie

Thanks for your response.

dpm_update_port_config(0, 2, 0, 1, 2);

pd_do_t SRC_PDO[1];

dpm_update_src_cap(0, 1, SRC_PDO);

dpm_update_src_cap_mask (0, 0x01);

Please tell me which .C file to new add .

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

is completed;you can check "CYPD3120-40LQXI_dp_dongle.hex.zip"

0 Likes
YiZ_31
Moderator
Moderator

Hi,

You could add them to main function.

0 Likes