1 2 Previous Next 21 Replies Latest reply on Oct 14, 2020 9:31 PM by YatheeshK_36

    CY7C65211A SPI access

    DeYu_4757331

      To whom it may concerns,

      We use CY7C65211A to interface both I2C and SPI. We get the I2C work fine, but we don't see any output toggle on any Pin#20, 22 and 23.

      The chip is configured as following:

      Mode: SPI

      Protocol: CDC

      The following is the software driver:

      Do we need any special handler for SPI access?

      Do you see any setup or connection wrong?@ !

      Please advise.

      Any response is highly appreciated.

      Have a wonderful one.

      Denny

        • 1. Re: CY7C65211A SPI access
          YatheeshK_36

          Hello Denny,

           

          1. Please make sure the device (COM port) is bound to Cypress CDC driver from the USB-Serial SDK.

              The device will appear as USB Serial port in the device manger under COM ports.

           

          2. please enter the COM port number to access the device using the command line utility.

           

          I have attached an example CDC master project which takes in the COM port number and writes 256 bytes incremental data.

          Please try the same.

           

          password: cypress

           

          Thanks,

          Yatheesh

          • 2. Re: CY7C65211A SPI access
            DeYu_4757331

            Thanks, Yatheesh.

            I will work with our software guy. Then got back to ASAP.

            Million thanks for your quick response.

            Best regards,

            Denny

            • 3. Re: CY7C65211A SPI access
              DeYu_4757331

              Hello Yatheesh,

              The software folk took a look your files.

               

              The following is the comment from him (Ron):

              What he mentioned is exactly what we are doing. The snippet of codes I sent you is the same spimaster code he's talking about. That came from the SDK kit package sample codes in C.

               

              So, he did exactly as your example.

              Do you have any further recommendation?

              Please advise.

               

              Thank you very much for your support and patience.

              Best regards,

              Denny

              • 4. Re: CY7C65211A SPI access
                RoRe_4753486

                Hello,

                This is Ron who is responsible of writing the application to interface with the device that Denny is working on.

                Here is some background of what we are trying to do and what have we done so far. We have a cypress chip CY7C65211A installed on our EVK board to interface via I2C and SPI. Note that we are already successful in interfacing with the I2C. Now, we reconfigured our EVK board to interface via SPI, following the design guidelines provided by Cypress. The problem we have  is that we are not seeing any clock movement coming out of GPIO5  of the Cypress chip. Note that we have not yet connected the slave device to the cypress, so none is connected to the SPI (MOSI, SCLK, SS) lines except for logic analyzer/scope to monitor the output of the cypress chip.

                 

                Here's how we do it:

                1. Power the EVK and plug in the USB.

                2. PC detected the device and assigned a COM Port.

                3. Set the scope for capture and wait on clock trigger

                4. Run spimaster.exe. This would starts the transmission of data and trigger some movements (toggle) at the clock line. Running with a trace (Debug breakpoints) on the code, I could see the it got through CyOpenVCP() and successfully acquired a handle. It also got past CySetSpiConfig_VCP() without error. When it executes the CySpiReadWrite_VCP() to do a write, it returns an error code 11 (timed out) which is expected when target is not connected.

                 

                So, from the software point of view, I don't see anything suspicious. With the SPI write in step 4, I would expect to see some activity at the SPI clock line (or any of the other SPI pins) and we are not seeing that. What are we missing?

                 

                -Ron

                • 5. Re: CY7C65211A SPI access
                  YatheeshK_36

                  Hello Ron,

                   

                  I tried the test and was able to get the data.

                   

                  Below is my setting

                   

                   

                   

                  Please confirm if the COM port is bound to the proper driver (USB Serial port with driver version 3.13.0.59 or 3.13.0.84)

                   

                  You can try with the previously attached application (spimaster) or also try using a teraterm to send data.

                  When anything is typed in the teraterm terminal, it is sent through the SPI when the SPI is configured in CDC mode.

                   

                   

                  If you still cannot get the data out of the SPI lines (SCLK and MOSI), please send me the snippet of the schematic containing the USB-Serial part.

                   

                  Thanks,

                  Yatheesh

                  • 6. Re: CY7C65211A SPI access
                    RoRe_4753486

                    Yes, the COM port is bound to Cypress driver 3.13.0.84

                     

                     

                     

                    Here's our Cypress configuration:

                     

                     

                     

                     

                    Here's the snippet of the schematic of our hardware configuration of the cypress chip.

                     

                     

                    I used TeraTerm as you suggested to eliminate question about the software. The result is the same. I still don't see any movement at any of the SPI pins.

                    • 7. Re: CY7C65211A SPI access
                      RoRe_4753486

                      Sorry, looks like the cutting and pasting images did not work.

                       

                      As suggested, I used TeraTerm also to eliminate question about the test software we're using.

                      Still no output at the SPI Pins.

                       

                      TeraTerm serial configuration.

                      TTerm.JPG

                       

                      Here's the Com Port driver bounding.

                      ComPort.JPG

                       

                      Here's the configuration

                      cycfg1.JPGCyConfig.JPG

                       

                      Here's the snipped of the schematic of the cypress on our board.

                      Pin 20 to 23 are connected to a header where we monitor the pins with a scope.

                      CypressConfig.JPG

                      • 8. Re: CY7C65211A SPI access
                        YatheeshK_36

                        Hello,

                         

                        The schematic seems fine except that the nXRES should not be left floating and should be pulled up to VDDD so that the device does not unnecessarily reset.

                        See point 7 in this KBA:USB-Serial: Hardware Design Schematic Checklist - KBA231249

                         

                        1. Is it the same issue on all the boards?

                         

                        If the application is reporting a timeout error, then its trying to communicate with the other device.

                         

                        2. Please check if the ground of the scope is connected to USB-Serial ground.

                         

                        3. Can you try reducing the SPI frequency in the USB-Serial configuration utility to 100 KHz and check?

                         

                        Thanks,

                        Yatheesh

                        • 9. Re: CY7C65211A SPI access
                          DeYu_4757331

                          Hello Yatheesh,

                          The schematic which Ron sent you was out of date. I changed the logic based on your recommendation in "Unknown USB Device for CY7C65211".

                           

                          I checked with I2C. I saw both SCL and SDA toggle as expected.

                          When I switched to SPI mode. I saw both SCK and SSL went down and stayed down until I unplugged and plugged the USB cable.

                          I checked "3" boards. All behaved the same.

                          All "3" have the same error message:

                          I did change the frequency from 1MHz to 100KHz. All have the same error.

                          I did remove all connections to Pin#20, 21, 22, and 23.

                          The behavior of SCK and SSL was the same. I got the same error.

                          For SPI, it should be very forgivable. It is "fire and forget" for write.

                          It doesn't need any external logic to pull it high or low.

                          Is there any special hardware setup requirement(s) for SPI excepted the configuration change?

                          Please advise.

                          Thank you very much for your support and patience.

                          Denny

                          • 10. Re: CY7C65211A SPI access
                            YatheeshK_36

                            Hello Denny,

                             

                            To check if this is a problem  only in CDC mode, please configure the SPI in vendor mode and try the program USB Serial Test utility from USB-Serial SDK (under bin folder) to just write the data. You can refer to the CYUSBS234 Kit User Guide section  3.3.5.1 to use the test utility.

                            Please let me know if the clock and data is seen on the lines.

                            If you still cannot see the data, please provide the newer schematic for review.

                             

                             

                             

                            Thanks,

                            Yatheesh

                            • 11. Re: CY7C65211A SPI access
                              DeYu_4757331

                              Hello Yatheesh,

                              I included the latest schematic in the last reply.

                              I did try to remove any connection to the SPI interface. I saw both SCK and SSL went down and stayed down until I unplugged the USB cable.

                              What do you want me to change on the hardware? The interesting point is the I2C work.

                              What make the SPI difference compare with I2C on the hardware standpoint?

                              Please educate me.

                              Thank you very much for your support and patience.

                              Have a wonderful one.

                              Denny

                              • 12. Re: CY7C65211A SPI access
                                YatheeshK_36

                                Hello Denny,

                                 

                                Looks like the schematic did not get attached in the response.

                                Can you please reattach it?

                                 

                                Also, please let me know if the SPI vendor mode test worked?

                                 

                                Thanks,

                                Yatheesh

                                • 13. Re: CY7C65211A SPI access
                                  DeYu_4757331

                                  Hello Yatheesh,

                                   

                                  What is the difference between vendor mode and CDC mode?

                                  Am I going to send data using the USB Serial Test Utility?

                                  Is it the same one which I use to configure the chip to SPI mode?

                                  Please educate me.

                                  Thank you very much for your support and patience.

                                  Denny

                                  • 14. Re: CY7C65211A SPI access
                                    DeYu_4757331

                                    Hello Yatheesh,

                                    I did copy and paste the schematic twice.

                                    When I clicked Add Reply, it disappeared.

                                    Please educate me what I did wrong.

                                    Thanks.

                                    Denny

                                    1 2 Previous Next