4 Replies Latest reply on Nov 21, 2019 10:03 AM by BDu_4573986

    CYPD3175 detailed programming flow using MiniProg3

    BDu_4573986

      Hello,

       

      I am a power electronics designer with essentially very little to no experience in programming. I have created a CYPD3175 direct feedback application to control a step-down buck regulator aimed at providing a USB-PD compliant output via a type-C connector. Using PSoC Programmer along with a MiniProg3 dongle, I've been able to program the CYPD3175 with existing hex files, thus verifying that the hardware works. I have all the latest software from Cypress (including EZ-PD CCGx Host SDK 3.3, all installed within the past 3-4 days).

       

      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.

       

      The PSoC Programmer GUI is pretty straight-forward and I think I know how to use it to load a hex file to the Cypress controller. Hardware and physical layer appear to work fine. I also fiddled with EZ-PD Configuration Utility and I think I can use the knowledge I have of USB-PD to come up with a configuration that suits my application.

       

      I suspect PSoc Creator (v. 4.2 installed) plays into the entire process and is likely the one piece of the puzzle I need help with, inclusive of what the proper flow is for the entire process - details here can never be in excess ;-) Read a lot of app notes, but in trying to address many other controllers, they did not clarify the aspects that still elude me at this time. I appreciate all the help that anybody can offer.

        • 1. Re: CYPD3175 detailed programming flow using MiniProg3
          RajathB_01

          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.

           

          Regards,

          Rajath

          • 2. Re: CYPD3175 detailed programming flow using MiniProg3
            BDu_4573986

            Hi Rajath,

             

            My hardware consists of my custom board - schematic attached. The FB pin interfaces with the buck switching regulator it is designed to control.

             

            CYPD3175 schematic.png

             

            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,

            Bogdan.

            • 3. Re: CYPD3175 detailed programming flow using MiniProg3
              RajathB_01

              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).

               

              If you are unfamilar with PSOC creator, please go through it's user manual and some videos.

               

              creator.jpg

               

              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

               

              Regards,

              Rajath

              • 4. Re: CYPD3175 detailed programming flow using MiniProg3
                BDu_4573986

                Rajath,

                 

                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,

                Bogdan