Skip navigation
Home > All Places > USB > EZ-PD Type-C USB > Blog > 2018 > December

Cypress SDK firmware demonstrate below feature in difference SDK firmware (@ December, 2018).

1. CCGx Host SDK (…  )

>> Power Source and Sink Role;

>> DisplayPort Source Role with Alternate Mode.


2. CCGx Power SDK (… )

>> Power Source and Sink Role;


3. CCGx Dock SDK (  )

>> Power Source and Sink Role;

>> DisplayPort Sink Role with Alternate Mode.


If you want to change DisplayPort Role based on above #1 and #3, either DisplayPort Source to DisplayPort Sink or DisplayPort Sink to DisplayPort Source. Only need take attention on below define to make sure below defines have been configured as per design requirements.


For Example: DisplayPort Source based Projects change to DisplayPort Sink.

@file: config.h


/* Enable Alternate Mode support when CCG is DFP. */

#define DFP_ALT_MODE_SUPP                           (0u)



/* Enable DisplayPort Source support as DFP. */

#define DP_DFP_SUPP                                 (0u)



/* Enable Alternate mode support as UFP. */

#define UFP_ALT_MODE_SUPP                           (1u)



/* Enable DP Alternate mode support in UFP mode. */

#define DP_UFP_SUPP                                 (1u)


@file: alt_modes_config.h


#define DFP_MAX_SVID_SUPP                       (0u)



#define UFP_MAX_SVID_SUPP                       (1u)


#define MAX_SVID_SUPP                           (DFP_MAX_SVID_SUPP > UFP_MAX_SVID_SUPP ? \

                                                        DFP_MAX_SVID_SUPP : UFP_MAX_SVID_SUPP)


@Software: EZ-PD configuration Utility

a. Open Ez-PD configuration Utilities to add SVID of DisplayPort Sink.

b. Select SVID Configuration and click +Add, SVID 0 will be add under SVID Configuration.

c. Select SVID 0 and edit SVID value and Mode on the right page. Change SVID value 0x0000 (default) to 0xFF01, Mode 0 value from 0x0 to 0x00001405(Plug design)/0x00040045(receptacle design).

d. Click File>Save As.

e. Find the .c file under the folder you have been saved on step c) above.

f. Open config.c under Source files in project. Change config table const unsigned char __attribute__ ((section (".configSection"), used)) gl_config_table[0x0400] by replace the table value from the .c file from Ez-PD configure Utilities above.


Otherwise, DisplayPort Sink change to DisplayPort Source is revise above ENABLE and DISABLE items.

1. New created CCGx project based on example code. (Use CCGx Host SDK, since the CCGx project in the Host SDK have includes i2c-boot project.)

  • File >> New >> Project…
  • Select project type >> Target kit: EZ-PD CCGx HOST SDK (CCG3)

  • Select project template >> Code example


  • Select a code example >> CYPD3125-40LQXI_notebook


  • Create Project>> name workspace/specify location/name project name.

  • Add i2c_boot project into workspace: right click “Workspace”, select Add>> Existing Project…


2. Boot-loader Project Changes.

  • Open TopDesign.cysch of i2-boot project. And then double click Bootloader_1 component to Make sure that the “Dual-application bootloader” option is unchecked.

  • Open config.h file from i2c-boot project head files. Enable define CCG_DUALAPP_DISABLE (CCG_DUALAPP_DISABLE is set as 0u for dual images by default.)

  • Compile the project to generate the customized single bootloader binary (.hex & .elf).


3. Application Project Changes (notebook example).

  • Pre-build CYPD3125-40LQXI_notebook. cyprj project and generate all relates files.
  • Open the CYPD3125-40LQXI_notebook. cyprj project using PSoC Creator 4.2 (the latest version). Double click Bootloadable_1 component and updates the. hex file and .elf file from above process.

  • Update Project -> Build Settings -> Debug -> Debug Target from Application Code and Data 2 to Application Code and Data.

  • Update linker script for single image build.

  • Open the “Project -> Build Settings -> ARM GCC -> User Commands” section and add the following pre-build command.

cmd /c "copy .\Bootloader\CYPD3125-40LQXI_i2c_boot_1_0_3_461_0_0_0_nb.c Generated_Source\PSoC4\cybootloader.c & copy .\Bootloader\CYPD3125-40LQXI_i2c_boot_1_0_3_461_0_0_0_nb.icf Generated_Source\PSoC4\cybootloader.icf"

-----------------------------------------Make sure first step was completed----------------------------------------------

  • Build All project


-- Attach files:

1. Guide.pdf -- steps for Create a single firmware build based on CCGx Host SDK v3.2.1 example project PDF format.

2. -- Example project based on CYPD3125-40LQXI_notebook.

3. cm0gcc.ld -- link script for single image.

Filter Blog

By date:
By tag: