What are the methods to program CCGx for various USB Type-C solutions?
Cypress supports the following firmware upgrade methods for different CCGx-based USB Type-C solutions:
|Application||SWD Programming||I2C Bootloading||CC Bootloading|
|Type-C to DP Cable Solution||Yes||Yes||NO|
There are two ways of programming the EZ-PD™ CCGx devices:
- Using the PSoC® Programmer and MiniProg3
- Using the Cypress-provided utility, cc_flash.exe, over CC line.
Question: How long does it take to load the application firmware in the CCGx controller over configuration channel (CC) bus using the EZ-PD Configuration utility?
Answer: It takes approximately 30 seconds to load the 20 KB application firmware in the CCGx controller over the CC bus using EZ-PD Configuration utility.
Question: How do I program a CCGx device using the PSoC® Programmer and MiniProg3?
Answer: You can upgrade the firmware in a CCGx device using the SWD interface in the device. This approach uses a PC running the PSoC Programmer software and a MiniProg3 programmer to program the CCGx device. This simple method of programming, typically during product development, can be used on a paddle card equipped with SWD header, such as the 10-pin Cortex® Debug Connector. The MiniProg3 programmer acts as the host programmer and the CCGx device as the target.
Figure 1. Upgrade Over SWD (using MiniProg3)
In addition, contact Cypress for the CCGx firmware images.
To use PSoC Programmer, follow these steps:
- Start PSoC Programmer from Start > All Programs > Cypress > PSoC Programmer.
- Connect one end of the USB cable to MiniProg3 and connect the other end to the PC.
- Connect MiniProg3 to the SWD header on the board.
- Select MiniProg3 from the Port Selection window, as shown in Figure 2.
Figure 2. PSoC Programmer Window
- Ensure the settings on PSoC Programmer are as highlighted in Figure 2.
- Click the File Load button, and select the appropriate hex file.
- The status message at the bottom-right corner of the PSoC Programmer window will indicate if the board is powered.
- If the board is not powered yet, click the Power button and verify the status message as in step 7
- Click the Program button to program the hex file onto the chip. When the file is successfully programmed, the “Programming Succeeded” message appears on the Actions window.
Question: How do I upgrade or program the firmware of an EZ-PD™ CCGx device over the CC line?
Answer: You can upgrade or program the firmware of an EZ-PD™ CCGx device over the CC line using the Cypress-provided PC utility, EZ-PD Configuration Utility.
A firmware upgrade application, EZ-PD Configuration Utility, is provided by Cypress and can be downloaded from www.cypress.com/ezpdutility. Cypress EZ-PD Configuration Utility is a Microsoft Windows application, which guides you to configure and program CCGx devices. The configuration table parameters should be chosen and programmed according to the use cases and requirements. The EZ-PD Configuration Utility allows you to intuitively select and configure the parameters. To keep pace with the USB-IF specification changes, this method can be deployed by cable manufacturers to provide upgrades to end users or to program the firmware after the cable assembly is manufactured. The CCGx device allows the firmware of the assembled cable to be upgraded over the CC line through a built-in bootloader.
This operation requires the CY4501 CCG1 Development Kit. The CCG1 host board contains a USB-Serial Bridge preconfigured to act as a USB-I 2C master bridge and a CCG1 device configured as a downstream facing port (DFP). While programming, the EZ-PD Configuration Utility sends data packets to the USB-Serial Bridge, which in turn sends them to the CCG1 Host Type-C Controller as I2C commands. The CCG1 Host Type-C Controller uses this data to construct vendor-defined messages (VDMs), which it sends to the CCGx device in the electronically marked cable assembly (EMCA) over the CC line. The CCGx device, upon receiving the VDMs from CCG1, generates VDM responses; these are sent to the Windows utility by the CCG1 Host Type-C Controller to check for errors.
Standard DFP implementations can only initiate USB-PD commands when a USB-PD power contract is in place. Because the DFP cannot set up a power contract while an upstream facing port (UFP) is not present, programming the CCGxbased EMCA cable requires both a host (DFP) and client (UFP) to be connected as shown in Figure 3. The CY4501 CCG1 Development Kit provides CCG1-based host and client boards that can be used in this setup.
Figure 3. Upgrading CCGx Configuration Table Using Configuration Channel (CC)
To upgrade the CCGx firmware over the CC line, follow the steps described in the EZ-PD Device Configuration Utility user manual, which is available at the following location after installing the EZ-PD Configuration Utility: C:\Program Files (x86)\Cypress\EZ-PD Configuration Utility\User Manual.
Contact firstname.lastname@example.org to obtain the appropriate CCGx firmware images.
Question: Can the CCGx controllers be programmed with a custom firmware during mass production?
Answer: Yes. See the CCGx programming specification for details.
Question: Is there any CC bootloader sample code available on any major operating system?
Answer: Yes. Cypress has CC bootloader sample code available on Windows. Contact Cypress at email@example.com.
Question: Does Cypress provide a tool to create a configuration file for the CCGx controller?
Answer: Yes. EZ-PD Configuration utility can be used to create configuration file. See the section “Saving the Configuration” in EZ-PD Device Configuration Utility user manual for detailed description.
Question: What is the difference between a .cyacd file and hex file?
Answer: EZ-PD CCGx controller consists of two types of bootloaders, namely CC bootloader and I2C bootloader. The CCG2 device allows the firmware of the assembled cable to be upgraded over the CC line through a built-in bootloader. The hex file consists of both bootloader and application firmware for the CCGx controller. On the other hand, the cyacd file consists of only the application firmware for the CCGx controller.
The bootloader can be downloaded into a CCGx device using Serial Wire Debug (SWD) pins. On the other hand, the application firmware can be downloaded using the EZ-PD Configuration Utility over the CC line.
Question: What is the purpose of Configuration table in the CCGx controller? Where can you find configuration table definitions?
Answer: EZ-PD CCGx controller is a highly reconfigurable solution. The configuration table stores various device parameters, Power Data Object (PDO) configuration, SVID configuration, PD port configuration and miscellaneous information into CCGx’s internal flash memory. Thus, you can reconfigure the CCGx controller by only updating this configuration table without modifying the firmware using the EZ-PD Configuration Utility.
Once the configuration is complete, the configuration can be saved in the form of a Cypress-defined binary file called the cyacd file. See the section “EZ-PD Device Configuration” in EZ-PD Device Configuration user manual for detailed description about configuration table definitions and the section “Saving the Configuration” in EZ-PD Device Configuration user manual for detailed description about creating a configuration file.
Question: Can the CCGx controller store user-specific parameters for the user’s future product development?
Answer: Yes. User-specific parameters can be stored in the CCGx device configuration table using the EZ-PD Configuration utility. See the “User Parameters” section in EZ-PD Device Configuration Utility user manual for further details.
Question: How do I to configure the CCGx (Power Delivery Object (PDO)/ Power delivery profiles) without modifying firmware?
Answer: The Cypress EZ-PD controller is a highly configurable and programmable solution. The chip can be configured using parameters stored in the internal flash memory. Cypress customers can choose and program these parameters according to their use cases and requirements.