We are able to successfully reproduce the issue. We will look into it and respond soon.
Thank you very much for your support and I am glad you could reproduce the issue.
I look forward to the results.
Program the i2c boot loader provided in the SDK or program the hex file attached to this response(CYPD2122-24LQXI_notebook_i2c_boot-nb_1_0_0_699_0_0_0_nb.hex) from the latest version of PSOC Programmer through the SWD to the CCG2 and update your user_button firmware(.cyacd file) through the EZ-PD configuration utility.
This should solve the issue. It is observed that the user button operation is not completely efficient, do retry pressing and releasing the user button again if it doesn't work the first time. The FET's are also working properly.
Please follow the above method and let us know if you are still facing the same issue.
Thank you for your reply.
This does indeed resolve the issue, can you explain the theory as to why?
The FETs are working properly, and the button pressing, as you stated is not completely efficient, but it does send the PD role swap request.
The button press method was simply a way to initiate a PD role swap to resolve the FET issue at first.
Unfortunately I will have trouble programming a CYPD2122-20FNXI using this method as I don't have pins set aside for the i2c interface.
If this is the only option I can try to set aside some pins for initial programming using the i2c programming method.
Do you have a recommendation as how to correct the code created in PSoC Creator to allow direct programming through the SWD interface?
The main reason for the issue was that the configuration table was being destroyed by the boot.
You can try using the standard boot loader from the SDK or remove the I2C boot from the project and give the Hex file attached in the previous response as a reference to the boot loader.
I believe I have located the problem, it was in the i2c_boot-nb.cydsn folder. Some items must have been out of date/sync.
After updating these files with those in the latest SDK it appears to have resolved the issue.
I am not completely sure why it does, as the boot loader passes control over to the main program, but it does appear to have resolved the issue.
With this issue resolved, I seem to be able to program over SWD without issue now and the FETs function as expected.
Thank you very much for your support!
I am attaching the files from the latest build for your reference, as it may help others with the same issue.
It should be noted that the gcc-arm-none-eabi-4_9-2015q1-20150306-win32 toolchain (easy to find and download) will be required to build the items in the i2c_boot-nb.cydsn folder.
I am attaching the original source with the fixed i2c_boot-nb.cydsn folder and also the source where I am implemented the button to issue the PD swap request.
Also to note, the i2c pins are not mapped in these files so the EZ-PD Configuration Utility will not be able to connect to program through the i2c pins, this is expected.
This is essentially a repost of the code located at the below link, updated for PSoC Creator 4.2.
Updating that topic with this code (or providing a link) may be a good idea so others don't have the same trouble I did at first.
Simple CCG2 example firmware for power bank