3 Replies Latest reply on Jul 23, 2020 1:03 AM by SananyaM_56

    What options are available to support two full sets of code in CCG devices?

    GrCa_1363456

      In CCGx components with more memory space, 128KB, the option to store multiple copies of firmware exists.

      For some applications, the full set of firmware with all features doesn't leave enough space for a second copy.

       

      Are all components of the code available for customers to reduce the code size by eliminating features to the point two full copies can fit into the 128KB available?

       

      Alternatively, is there an example to add external memory for those customers who need to maintain two or more full sets of code?

       

      Greg

        • 1. Re: What options are available to support two full sets of code in CCG devices?
          SananyaM_56

          Hi Greg,

           

          Could you please confirm that by the first question you would like to know the parts of the code that can be optimized to fit in the same two copies in the Flash?

          And for the second question do they want an option to boot from external flash?

           

          Best Regards,

          Sananya

          • 2. Re: What options are available to support two full sets of code in CCG devices?
            GrCa_1363456

            Sananya,

             

            Any links to application notes or examples utilizing dual copies of firmware in CCGx parts would be helpful.

             

            By the first question, I was asking if enough source code was provided, such that a user could optimize the code. I'm not clear how much of the code written for CCGx devices is fixed and how much is open source.

             

            I do like the suggestion in your response. Knowing the parts of the code that can be optimized to fit in the same two copies of Flash, would accomplish the same end result. An example showing what subset of features could fit side by side, would be useful.

             

            Booting from external flash is an additional feature I hadn't considered. If that is possible are there any examples?

            The primary question with external flash I had is if there are examples to store and retrieve a copy of firmware using external flash. I do now see, if an extra copy of firmware was stored in external flash, the CCGx part would either need to be able to execute from external flash or have a fail-safe process to boot if there was a crash during the process of copying external flash to internal.

             

            Greg

            • 3. Re: What options are available to support two full sets of code in CCG devices?
              SananyaM_56

              Hi Greg,

               

              Please refer to section 5.4 of the CCGx Host SDK User Guide that explains the Flash Memory Map of the CCG4/CCG5/CCG6 devices and also mentions how the dual copies are implemented in the SDK projects for those devices.

               

              The features of the primary and backup firmware that are mentioned in the release notes are configurable using the compile time macros in config.h file for the two projects. Currently, in the CYPD4126-24LQXI project, the primary firmware takes up around 72KB while the backup firmware takes up around 46KB of Flash. The customer could customize both the projects to have the same features for e.g. enable PD command support over HPI for the backup firmware while disabling UCSI support in the primary firmware. This would optimize the Flash usage with both the firmware images present.

               

              Currently there are no examples in the Host SDK of CCGx devices adding an external flash to boot from, as it would require a custom bootloader implementation as well.

               

              Best Regards,

              Sananya

              1 of 1 people found this helpful