I am currently working on a project involving a CCG2 CYPD2122-20FNXI chip.
Other topics related to this are as follows…
Design confirmation for CCG2 CYPD2122-20FNXIT charge through USBC to USB2 adapter dongle
Programming CYPD2122-20FNXI with PSoC creator 3.3 unsupported trouble
Details on the specifics of the project are below.
I have taken the sample project (due to simplicity of removal of DP and related logic).
Simple CCG2 example firmware for power bank
This sample is very close to the final goal.
I have changed the device to the CYPD2122-20FNXI, and ported it to the PSoC Creator 4.2 development environment.
The project builds without error, and runs on the CYPD2122-20FNXI (programmed with PSoC MiniProg3), but with some issues… I will outline here.
I also have programmed the CCG2 CY4521 Evaluation Kit (includes CYPD2122-24LQXIT) with this sample project and works as intended, but porting to the CYPD2122-20FNXI results in some issues.
The FET circuit matches the CY4521 Evaluation Kit so logic can be used as-is.
Some differences, VCONN1, VCONN2 are not connected in the CYPD2122-20FNXI design.
+ While the CYPD2122-24LQXIT initially sets up as a DFP (charges the smart phone) when connected to a Samsung Galaxy S8, the CYPD2122-20FNXI sets up as a UFD. How can I setup the the CYPD2122-20FNXI to initially attempt to be a DFP (source)?
+ Attempting to issue a PD role swap via handle_pd_command(DPM_CMD_PR_SWAP, NULL, NULL); results in the PR swap taking place, accepted message, but FETs are not switched correctly… VBUS_MONITOR issue?
+ Running the project in Debug mode, disabling boot loader has issues of the CCG2 failing to respond to a VDM:DiscIdentity request from the accessory, this the accessory appears to drop the communication after repeated attempts. Failure to access data stored in .configSection perhaps?
+ I have been trying to use EZ-PD configuration software for generating the PDO table, it appears support is not available for the CYPD2122-20FNXI, I have been using the PSD table generated for the CYPD2122-24LQXIT as a result.
I have spent the last several days trying to locate these issues without much success.
The most confusing thing is what works on the CYPD2122-24LQXIT does not work on the CYPD2122-20FNXI even though the logic is identical, with exception of VCONN missing, and pins mapped differently.
Current project code and schematic are uploaded. Any insights on this would be greatly appreciated!
Below is a brief description of the current project and end goal.
The functionality that I am aiming for is a DRP accessory. This accessory is attached to a USBC based smart phone for USB2.0 data and power delivery. The power delivery can go either direction, to charge the phone from the accessory, or provide power to the accessory.
The accessory contains a battery and can be mains powered. While charging could be accomplished through the USBC connection on the accessory, this case may be rare.
The choice of the CYPD2122-20FNXI chip is due to limited space requirements and DRP functionality. A CCG3 would be more appropriate, but due to space constraints the CCG2 was chosen.
A simple schematic is uploaded, this shows connections to the CCG2. Consumer and provider control FETs are located on a separate PCB, but are marked on CCG2 pins on the schematic.