7 Replies Latest reply on Mar 14, 2018 3:32 AM by kalle.raiskila_3142546

    CyUSBS234 devkit, going to I2C mode without GUI tool

    kalle.raiskila_3142546

      Hi,

      I have the CyUSBS234 devkit to test out Cypress' software support for USB-to-I2C bridges.

       

      The devkit's userguide says I should use some tool to set the devkit (chip? doesn't say) into I2C mode.

      But this tool is mentioned only in the chapter for "setting up on Windows". Also, I can find in the API only

      functions to configure a I2C module, but not what this Windows GUI tools seems to do - i.e. changing some mode.

       

      Does this mean the chip cannot be programmatically changed from I2C to SPI to UART mode, but

      requires a Windows GUI tool to do this? Or did I just miss the part with the instructions for doing this over the Cypress USB stack?

       

      I did get he CyUSBSerialTestUtility to see the chip, but instead of what the SDK README says here, i.e.:

       

         $ CyUSBSerial

         ----------------------------------------------------------------------

         Device Number | VID | PID | INTERFACE NUMBER | FUNCTIONALITY

         ----------------------------------------------------------------------

         0             |4b4  |a    | 0     | VENDOR_I2C

         0             |4b4  |a    | 1     | VENDOR_SPI

         0             |4b4  |a    | 2     | NA

         ----------------------------------------------------------------------

       

      I'm seeing only NA as the functionality for each interface number.

      If it was possible to switch modes run-time, surely the CyUSBSerialTestUtility could do this?

       

       

      thanks,

      kalle

        • 1. Re: CyUSBS234 devkit, going to I2C mode without GUI tool
          srnt

          Hello Kalle Raiskila,

           

          Firstly, confirm me if you are using the CYUSBS234 or CYUSBS236 DVK. I find that you have mentioned CYUSBS234 which has got a single serial communication block. But in the description, you have mentioned a PID of 0x000A with a I2C interface and a SPI interface. This pertains to a CYUSBS236 DVK.

           

          For a CYUSBS234 DVK,

           

          - To configure the CY7C65211 device as I2C, Vendor mode, please follow the below steps.

          - Extract the files from the attachment.

          - Open the Command prompt and change the directory to the extracted folder.

          - Run the below command to download the configuration file onto the CY7C65211 device:

          fwDownload -vid 0x04B4 -pid 0x0002 -mode vendor -c I2C_VR.cyusb -timeout 25000

           

          NOTE: In the above command, the PID is 0x0002. Modify this to the PID of the device while programming.

           

          This will configure the device in I2C Vendor mode.

           

          Please let me know if this satisfies your requirement.

           

          Best regards,

          Srinath S

          • 3. Re: CyUSBS234 devkit, going to I2C mode without GUI tool
            kalle.raiskila_3142546

            Thanks for the reply Srinath, pardon my late reply (I had email notifications off, I guess).

             

            Yes, this is a CYUSBS234. The output is what the SDK documentation tells me I should expect. Sorry for the confusion.

             

            Thanks for the tool. But seems the .rar file is password protected. In any case, the .rar file seems to have only a .exe - is this a windows executable? Is the source code for that tool available somewhere?

             

            What I am hoping to achieve is that we can use the CY7C65211 as is with our software, without factory programming, so our software could switch the device mode when a new device is first taken into use. This software has to run on all three major PC operating systems.

             

            There seems to be a 'user flash' area on the chip that can be read and written to via the USB API. According to the CY7C65211 datasheet that might contain this setting to turn the device into I2C mode. But the datasheet doesn't describe the exact memory layout of the settings stored in flash. I could not find any further information about these settings - where is the memory layout of this flash described?

             

            Incidentally, this post Re: how to set CYUSBS234  serial port mode in linux didn't pop up when I posted my question, but that seems to be an exact duplicate of this question.  (for posterity, if the link dies, solution is "contact Cypress Tech Support". Which is what  I actually thought I was doing here ). I guess I go with that solution

            • 4. Re: CyUSBS234 devkit, going to I2C mode without GUI tool
              srnt

              Hello Kalle Raiskila,

               

              - Password for the .rar file: cypress

              - The executable that is shared is a Windows executable. It can be used to switch the configuration of the device from the default mode to the one that is defined in the .cyusb file.

              - The memory layout of the internal flash is not disclosed to the users.

              - The command line utility to modify the configuration in Linux also requires a Windows utility to generate a file of the .cyusbd format. This procedure is being tested. I will update you with the complete procedure once the testing is done.

               

              Best regards,

              Srinath S

              • 5. Re: CyUSBS234 devkit, going to I2C mode without GUI tool
                kalle.raiskila_3142546

                - Password for the .rar file: cypress

                Thanks.

                - The memory layout of the internal flash is not disclosed to the users.

                Ok, this I was confused about after reading the datasheet - it mentioned 'writing flash', but only after the context of this thread did I understand what was meant. Too bad.

                - The command line utility to modify the configuration in Linux also requires a Windows utility to generate a file of the .cyusbd format. This procedure is being tested. I will update you with the complete procedure once the testing is done.

                This would be awesome. But would this still mean that just programming a .cyusbd file is still not possible even via the hidden API (i.e. some non-disclosed encryption calculation is happening in the tool, host side)?
                If so, then may I add a request for a OSX version aswell . And shared libs complementing the stand-alone tool

                • 6. Re: CyUSBS234 devkit, going to I2C mode without GUI tool
                  srnt

                  Hello Kalle Raiskila,

                   

                  - The procedure is similar for OSX version also.

                  - To generate the .cyusbd file, the Windows Utility still has to be used.

                   

                  I am attaching the files required for implementation of this in Linux and Mac OSx. The procedure is mentioned in 'Instructions to use the Command line utility in Linux' file. Please find the same.

                   

                  Password for the attachment file: cypress

                  1 of 1 people found this helpful