5 Replies Latest reply on Apr 10, 2020 12:19 AM by YatheeshK_36

    USB Serial Library for CY7C65211A

    NoAr_1540581

      Hello

       

      The product (CY7C65211A) is connected to the HOST PC (Windows 10) via USB. Up to 16 products can be connected to one PC.

      They need to identify multiple connected devices using Cypress API.

      In particular,  The device is selected and operated with the device number (deviceNumber) obtained by the CyGetListofDevices () function included in CyUSBSerial.h.

      So, they want to know the physical location of the device corresponding to this device number, but it seems that there is no parameter that can be distinguished in CyUSBSerial.h when the same device is connected multiple times. Is there a better way?

       

       

      Best Regards

      Arai

        • 1. Re: USB Serial Library for CY7C65211A
          YatheeshK_36

          Hello,

           

          Please refer to this KBA: Accessing Multiple USB-Serial Devices using the Device Instance Path – KBA228257  and use the function GetDevicePath() mentioned in the KBA. Using this you can get the unique device instance path of a Cypress device by passing the device number as an argument. 

          Another method to identify a cypress device is assigning a unique serial number to each device and retrieving the same using the CyGetDeviceInfo API and CY_DEVICE_INFO structure from the Cypress USB-Serial API library. Please refer to the API document in the USB-Serial SDK.

           

          Thanks,

          Yatheesh

          • 2. Re: USB Serial Library for CY7C65211A
            NoAr_1540581

            Hello

             

            KBA228257 is described below.

            >When a USB-Serial part configured as I2C, SPI, or UART in vendor mode is connected to USB host, one or more devices will be enumerated >based on the configuration.

            >

             

            Regarding the above, if they are using it only USB to GPIO configuration( No need I2C/SPI/UART bridge) in their system,
            Can the GetDevicePath() APIs be used as well?

            Best Regards

            Arai

            • 3. Re: USB Serial Library for CY7C65211A
              YatheeshK_36

              Hello Arai,

               

              Yes, the API can be used.  The line in the KBA states that, when the USB Serial device is configured as I2C/SPI/UART in vendor mode multiple devices will be enumerated in the device manager including the manufacturing interface which will always be bound to the cypress driver, each device with a unique instance path. In this case case should be taken to address the right device.

               

              If you are using only the GPIO functionality, then you can set the SCB to UART CDC mode (2-pin) or I2C vendor mode, which will consider only 2 pins of the corresponding SCB and all other unused pins will be available as GPIO pins, whose functionality (input /output) can be set in the CapSense/BCD/GPIO -> Unused GPIO drive mode.

              If you are setting the SCB to UART CDC mode, you will have to access the manufacturing mode device number to receive an handle to the device to control the GPIO.

              If only one device is connected (UART CDC mode) then device number of the manufacturing index will be 0.

               

              Thanks,

              Yatheesh

              • 4. Re: USB Serial Library for CY7C65211A
                NoAr_1540581

                Hello Yatheesh san

                 

                In conclusion, When they are using only GPIO functions, and  it is necessary to identify multiple connected devices, is it ok to think that they have to configure it as I2C/SPI/UART in vendor mode?

                 

                Best Regards

                Arai

                • 5. Re: USB Serial Library for CY7C65211A
                  YatheeshK_36

                  Hello Arai,

                   

                  If only GPIOs are used, it is not necessary to identify multiple device. The CY7C65211A part SCB can be configured to operate in any protocol (I2C/UART/SPI) in vendor or CDC mode.

                   

                  Thanks,

                  Yatheesh