Cannot programming CY4521

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
WiCh_3149431
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

I brought a CY4521 kit from Cypress store, and got it today. The Order number is 1383701. I try to test my FW which modify from CYPD2122-24LQXI_notebook project, I programming my FW by EZ-PD Configuration Utility several times without problem, but the last time the programming was fail and interrupted, I don't know the reason why, there are not any hardware issue like USB cable unpluged or loss power when programming FW. After that, the EZ-PD Configuration Utility can not find CY4521 anyway that I cannot program CY4521. I try press reset button and re-power to CY4521, but the EZ-PD Configuration Utility still can not find CY4521, this CY4521 might be malfunction, please help me fix this problem, or this CY4521 need to RMA? This is very serious and urgent, I can not develop my FW without CY4521, please Cypress help me fix this problem.

Firmware Update.jpg

0 Likes
1 Solution

Hi ,

1. Please kindly continue to use PSoC Creator 3.3 for the firmware I was shared to you to avoid software IDE configuration issue. Since the firmware I was made is based on PSoC Creator 3.3.

2. The CY4521 should be re-work hardware and firmware to enable higher than 5V PDO. Only add the PDO into the configure table is not enough. Below is the guide for this.

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

Hardware setup based on CY4521 board Rev.03 default setting.

OPEN J11 1-2; (GPIO for LED blink)

SHORT TP17 and TP20; (Equal to load R22); (VSEL1 for DC/DC feedback control)

SHORT TP18 and TP21; (Equal to load R23); (VSEL2 for DC/DC feedback control)

Firmware changes as below:

1) Add additional source PDOs 9V/5A, 15V/5A, and 20V/3A with Ez-PD configuration Utility. And then update config table in CYPD2122 firmware config.c file.

  

2) Update bootloader hex file in bootloadable components.

3) Open TopDesign.cysch, disable LED_PIN and I2C_CONFIG (Please notice only disble I2C config on application not on the I2C bootloader.). Add new output pins and named VSEL1 and VSEL2.

4) Open notebook.cydwr. add pin assignment of VSEL1 to P1[1] and VSEL2 to P1[2].

 

4) Comments out below lines to enable VSEL1 and VSEL2 function and voltage macro define (based on SDK v3.0.2).

  1. a. @psource.h

- (line 86, col 1): // #ifdef PD_APP_POWER_ADAPTER_INC

- (line 95, col 1): // #endif /* PD_APP_POWER_ADAPTER_INC */

  1. b. @psource.c

- (line 140, col 1): // #ifdef PD_APP_POWER_ADAPTER_INC

- (line 256, col 1): // #endif /*PD_APP_POWER_ADAPTER_INC*/

- (line 478, col 1): // #ifdef PD_APP_POWER_ADAPTER_INC   

- (line 481, col 1): // #endif /* PD_APP_POWER_ADAPTER_INC */   

- (line 505, col 1): // #ifdef PD_APP_POWER_ADAPTER_INC

- (line 509, col 1): // #endif /* PD_APP_POWER_ADAPTER_INC */

5) Rebuild firmware to generate hex file for CY4521.

Best Regards,

Lisa

View solution in original post

0 Likes
12 Replies
YatheeshD_36
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello William,

Please check if the device is getting detected in device manager.

If the device is detected in the device manager, you can try reprogramming the device firmware hex file (CYPD2122-24LQXI_notebook_i2c_boot-nb_1_0_0_699_0_0_0_nb.hex) from the CCG2 SDK using the miniprog 3 through SWD.

This should reconfigure the device and the device will show up on the EZ-PD configuration utility.

Best Regards

Yatheesh

0 Likes

Hi, Yatheesh:

At begin, we use miniprog 3 to program CY4521, but not successful, then we change to use EZ-PD Configuration Utility to program CY4521. Now even the EZ-PD Configuration Utility can not program CY4521.

miniprog 3.jpg

0 Likes

Hello William,

Please choose 5p Connector. Refer to the picture below for the configuration setup.

Connect VDDD to V5P0 on J2 and VDDIO to VDDD on J3.

Program the CYPD2122-24LQXI_notebook_2_3_1_306_0_0_0_nb.hex file from the SDK>CCG2>firmware>binaries.

pastedImage_0.png

Best Regards

Yatheesh

0 Likes

Hi, Yatheesh:

Follow your instruction, it is still fail.

miniprog 3.jpg

0 Likes

Hi, Yatheesh:

I probe SWD IO signal with scope to check the signal when programming, it become successful programming. But the EZ-PD Configuration Utility still can not find CYPD2122.

0 Likes
lock attach
Attachments are accessible only for community members.

Hello William,

Please try programming the firmware hex file attached to this response.

Best Regards

Yatheesh

0 Likes

Hi, Yatheesh:

After program the attached .hex file, the EZ-PD Configuration Utility can find CYPD-2122.

Firmware Update-2.jpg

But I program my FW by EZ-PD Configuration Utility, it response "Error : DLL call returned error while flashing", my FW did not successful program by EZ-PD Configuration Utility, after that, the EZ-PD Configuration Utility can not find CYPD-2122 again, but my FW can successful program by MiniProg3 and running no problem.

DLL call returned error while flashing.jpg

0 Likes

Hi, Yatheesh:

My FW code might be conflict with the EZ-PD Configuration Utility firmware update function.

0 Likes

Hello William,

It looks like the configuration table is getting destroyed due to miss match with the boot loader. Which version of PSOC creator are you using. Please use the latest version (PSOC Creator 4.2) to build your project.

You can also try using the older version of the Configuration Utility which was previously working fine with the current PSOC creator version which you are using.

Best Regards

Yatheesh

0 Likes

Hi, Yatheesh:

I use PSOC Creator 3.3. Then I change to PSOC Creator 4.2, There are 2 errors when build.

2 errors.jpg

The Bootloadable become red.

Bootloadable red.jpg

I check the dependencies is correct.

dependencies.jpg

This FW was provided by Lisa(Cypress, Shanghai) which we requested to read TYPE-C cable E-marker VDM data. Please help to fix these errors.

0 Likes

Hi, Yatheesh:

The original CY4521 source PDO only support 5V 3A, according CY4521 hardware schematic, it support 5V, 9V, 15V and 20V configuration. I use EZ-PD Configuration Utility add 9V, 15V and 20V source PDO and use a USB sniffer connect to CY4521 TYPC-C port, USB sniffer can read 5V, 9V, 15V and 20V configuration. But I trigger to 9V, 15V and 20V, CY4521 still only output 5V, it seems CYPD2122 do not switch VSEL1 and VSEL2. Would you please answer my question?

CY4521 5-9-15-20V.jpg

USB sniffer KM-001.jpg

0 Likes

Hi ,

1. Please kindly continue to use PSoC Creator 3.3 for the firmware I was shared to you to avoid software IDE configuration issue. Since the firmware I was made is based on PSoC Creator 3.3.

2. The CY4521 should be re-work hardware and firmware to enable higher than 5V PDO. Only add the PDO into the configure table is not enough. Below is the guide for this.

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

Hardware setup based on CY4521 board Rev.03 default setting.

OPEN J11 1-2; (GPIO for LED blink)

SHORT TP17 and TP20; (Equal to load R22); (VSEL1 for DC/DC feedback control)

SHORT TP18 and TP21; (Equal to load R23); (VSEL2 for DC/DC feedback control)

Firmware changes as below:

1) Add additional source PDOs 9V/5A, 15V/5A, and 20V/3A with Ez-PD configuration Utility. And then update config table in CYPD2122 firmware config.c file.

  

2) Update bootloader hex file in bootloadable components.

3) Open TopDesign.cysch, disable LED_PIN and I2C_CONFIG (Please notice only disble I2C config on application not on the I2C bootloader.). Add new output pins and named VSEL1 and VSEL2.

4) Open notebook.cydwr. add pin assignment of VSEL1 to P1[1] and VSEL2 to P1[2].

 

4) Comments out below lines to enable VSEL1 and VSEL2 function and voltage macro define (based on SDK v3.0.2).

  1. a. @psource.h

- (line 86, col 1): // #ifdef PD_APP_POWER_ADAPTER_INC

- (line 95, col 1): // #endif /* PD_APP_POWER_ADAPTER_INC */

  1. b. @psource.c

- (line 140, col 1): // #ifdef PD_APP_POWER_ADAPTER_INC

- (line 256, col 1): // #endif /*PD_APP_POWER_ADAPTER_INC*/

- (line 478, col 1): // #ifdef PD_APP_POWER_ADAPTER_INC   

- (line 481, col 1): // #endif /* PD_APP_POWER_ADAPTER_INC */   

- (line 505, col 1): // #ifdef PD_APP_POWER_ADAPTER_INC

- (line 509, col 1): // #endif /* PD_APP_POWER_ADAPTER_INC */

5) Rebuild firmware to generate hex file for CY4521.

Best Regards,

Lisa

0 Likes