My question is: how does one go about creating a hex file from scratch? My problem is that I could not find a hex file that likely matches the power profiles I want my application to support and also, without having created the specific configuration, I cannot tell what settings are being programmed into the CYPD3175 via an existing hex file... over-current trip points, etc. Hence, the need to gain the ability to program the controller from scratch.
You can generate a HEX file by building an SDK PSoC Creator project. But if all you need to change is power profiles, over-current thresholds and stuff like that, EZ-PD Configuration Utility should be more than enough.
What kind of hardware are you using? Is it our CY4532 Evaluation board or your custom board?
Are you aware of the CC-bootloading capablities of CCG3PA and how you can do it using the EZ-PD Config tool? This info is present in both datasheet and app note. Also please go through the user guide for EZ-PD Config utility.
Using the EZ-PD config utility, you have two options: (1) you can directly update the configuration in the existing firmware of the controller. (2) Save the configuration as a C-file and compile it with the SDK project to generate a complete HEX with updated configs - so that you can use SWD programming.
Option (1) can be used if you have a cc-bootloading hardware like CY4532 kit. Option (2) will serve in any situation.
Let me know where exactly you are stuck in using the utility.
My hardware consists of my custom board - schematic attached. The FB pin interfaces with the buck switching regulator it is designed to control.
The board has a 5-pin header that matches the MiniProg3 output and I am using it to program via SWD. The CYPD3175 is soldered down onto the board and each one of the boards has this header for programming (or later re-programming).
I want to understand what the process flow looks like for creating a hex file that I can then program into the 3175 controller. Assume I do not have any hex file to start from. What do I do?
Do I first create a USB-PD configuration using the EZ-PD tool? Check - I can do that; what I get is a C file and a CYACD file.
What comes next? What tool do I use and what are the steps (assume using one of the above steps) - exactly how do I compile say the C file into a hex file and what else do I need to set, or do, in the PSoC Creator (if that is the tool) to arrive to a complete firmware configuration that I can then load into the 3175 to obtain the functionality described in the EZ-PD configuration? This part in the middle is what I am very foggy about - many details, or a step-by-step tutorial aimed at my situation would be of great help (providing the process is sufficiently complex). Reminder that I do not have a programming background.
I assume then I can use the PSoC Programmer to load this resulting hex file with my custom firmware configuration into the 3175 flash.
Thank you for your help,
Understood. You are only unclear on how you get the HEX file from the C file containing configuration.
You will need to place the "config.c" file generated using the config utility in place of the "config.c" default file present in the firmware project.
You will need to download the software development package from here.
Make a copy of the EZ-PD CCGx Power SDK folder installed in Program files, onto your working folder (other than Program files) and go to this location: EZ-PD CCGx Power SDK\CCGx\Firmware\projects\CYPD3175-24LQXQ_pa_direct_fb\CYPD3175-24LQXQ_pa_direct_fb.cydsn\common\config.c
Replace the default config.c file with the one you have generated, open the project worksapce (EZ-PD CCGx Power SDK\CCGx\Firmware\projects\CYPD3175-24LQXQ_pa_direct_fb\CYPD3175-24LQXQ_pa_direct_fb.cywrk) using PSoC Creator and give build command - Shft+F6 (no code changes required as per your requirements).
You will find the HEX file output in this location: \CYPD3175-24LQXQ_pa_direct_fb\CYPD3175-24LQXQ_pa_direct_fb.cydsn\CortexM0\ARM_GCC_541\Debug\CYPD3175-24LQXQ_pa_direct_fb.hex
Thank you very much. Followed your instructions and got PSoC Creator to compile a hex file successfully. I will not be able to check the operation until early next year, when mating hardware arrives in our lab (essentially the buck regulator being controlled by the CYPD3175), but I am hopeful I now have a path to programming this device.
All the best to you,