Whenever you want to change the configuration, you need to re-enumerate the device with the new configuration (Disable the USB connection, register a new configuration and enable the USB connection)
If you are using any one of the two configurations at a time, the Number of configurations field of Standard Device descriptor has to be set to 1. However, you need to declare both the configurations in the USB descriptor file and select the configuration by passing appropriate configuration to CyU3PUsbSetDesc() API depending on the profile.
Suppose you have two Configuration descriptors CyFxUSBHSConfigDscr1 and CyFxUSBHSConfigDscr2. Now, in one of the modes, you want to select the Configuration descriptor CyFxUSBHSConfigDscr1. In this case, you need to call the CyU3PUsbSetDesc() API as: CyU3PUsbSetDesc(CY_U3P_USB_SET_HS_CONFIG_DESCR, 0, (uint8_t *)CyFxUSBHSConfigDscr1); When you want to switch to the other configuration, you need to call the CyU3PUsbSetDesc() as: CyU3PUsbSetDesc(CY_U3P_USB_SET_HS_CONFIG_DESCR, 0, (uint8_t *)CyFxUSBHSConfigDscr2);