4 Replies Latest reply on Aug 19, 2020 12:14 PM by AbFa_4663241

    CYW20719 SPI Hardware Issue

    AbFa_4663241

      I'm using CYW920719Q40EVB-01 which is connected to an evaluation board (as a SPI slave) having an MCU via SPI interface. In my code, CYW920719Q40EVB-01 is a SPI Master which is sending/receiving array of 1024 bytes to/from my Slave board. The Slave board is powered by the 3.3V supply from CYW920719Q40EVB-01, so both boards use the same voltage.

       

      My experiments:

       

      1- Before connecting to CYW920719Q40EVB-01 board, my SPI slave board has been tested with a similar board with good SPI communication.

       

      2- After CYW920719Q40EVB-01 is connected to the Slave board, I noticed that the data is transmitted from the Master (CYW920719Q40EVB-01) board to slave board but the Master receives all zero data.

       

      3- Using an oscilloscope, I noticed that the High-level on the MISO wire is about 620 mV. Please see the attached snapshot showing the CS and MISO traces.

       

      4- When the MISO wire between the Master and Slave is disconnected, the MISO output from the Slave shows normal High level (3.3V), again connecting the MISO from the Slave to the CYW920719Q40EVB-01 brings the High-level voltage of MISO to 620 mV.

       

      5- The MOSI wire out of CYW920719Q40EVB-01 shows normal voltage level and correct data is received by the Slave board.

       

      6- Different situations like using Pull-Up and Pull-Down or changing SPI1 and SPI2 in SPI initialization did not fix this issue.

       

      My questions:

       

      Why does the MISO input on CYW20719 drops to a lower voltage while the MOSI output shows normal operation?

      Is this because I'm using a defective evaluation board (CYW920719Q40EVB-01) or I'm missing something in my coding. I'm using the SPI Master example code provided for CYW920719Q40EVB-01.

       

      Thanks!

       

      Abi

        • 1. Re: CYW20719 SPI Hardware Issue
          AnjanaM_61

          Hi AbFa_4663241 ,

           

          Can you please confirm which WICED SDK version are you using?

          I had tested the default demo example available in SDK and it should work properly.

          Can you please confirm you haven't modified anything in the example project? Also please confirm the pins and baud rate which you are using.

           

          Regards,
          Anjana

          1 of 1 people found this helpful
          • 2. Re: CYW20719 SPI Hardware Issue
            AbFa_4663241

            Hi Anjana,

             

            I am using WICED-Studio-6.2.

            I just included SPI Includes, SPI Init, and SPI APIs needed for an SPI communication.

            And I used the same Pins for the SPI copied here:

            * Hardware connections on CYW920719Q40EVB_01:

            * CS - P7 - D10

            * MOSI - P28 - D11

            * MISO - P1 - D12

            * CLK - P38 - D13

             

            And in my code:

             

            //SPI Initialization:

            void spi_init(void)
            {
                UINT8 result = 1;

                /*Initialize CS GPIO and SPI*/
                wiced_hal_gpio_configure_pin(CS, GPIO_OUTPUT_ENABLE, GPIO_PIN_OUTPUT_HIGH);
                wiced_hal_pspi_init(SPI1, SPI_MASTER, INPUT_PIN_PULL_UP, MASTER_P38_CLK_P28_MOSI_P01_MISO, DEFAULT_FREQUENCY, SPI_MSB_FIRST, SPI_SS_ACTIVE_LOW, SPI_MODE_0, CS);
            }

             

            //Exchanging Data

            wiced_hal_gpio_set_pin_output(CS, GPIO_PIN_OUTPUT_LOW);

            //   wiced_hal_pspi_tx_data(SPI1, sizeof(data_out_buffer), send_data);

            wiced_hal_pspi_exchange_data(SPI1, sizeof(data_out_buffer), (UINT8*)send_data, (UINT8*)data_out_buffer);

            wiced_hal_gpio_set_pin_output(CS, GPIO_PIN_OUTPUT_HIGH)

             

            And I'm using the default platform settings, in my "wiced_platform_pin_config.c" under "platform/CYW920719Q40EVB_01" folder I have :

             

            /* all the pins available on this platform and their chosen functionality */

            const wiced_platform_gpio_t platform_gpio_pins[] =

                {

                    [PLATFORM_GPIO_0 ] = {WICED_P00, WICED_GPIO              },      //Button

                    [PLATFORM_GPIO_1 ] = {WICED_P01, WICED_SPI_1_MISO        },

                    [PLATFORM_GPIO_2 ] = {WICED_P02, WICED_PCM_OUT_I2S_DO    },

                    [PLATFORM_GPIO_3 ] = {WICED_P04, WICED_PCM_IN_I2S_DI     },

                    [PLATFORM_GPIO_4 ] = {WICED_P06, WICED_GCI_SECI_IN       },

                    [PLATFORM_GPIO_5 ] = {WICED_P07, WICED_SPI_1_CS          },

                    [PLATFORM_GPIO_6 ] = {WICED_P10, WICED_GCI_SECI_OUT      },

                    [PLATFORM_GPIO_7 ] = {WICED_P16, WICED_PCM_CLK_I2S_CLK   },

                    [PLATFORM_GPIO_8 ] = {WICED_P17, WICED_PCM_SYNC_I2S_WS   },

                    [PLATFORM_GPIO_9 ] = {WICED_P26, WICED_GPIO              },      //Default LED 2

                    [PLATFORM_GPIO_10] = {WICED_P25, WICED_I2C_1_SCL         },

                    [PLATFORM_GPIO_11] = {WICED_P28, WICED_SPI_1_MOSI        },      //Optional LED 1

                    [PLATFORM_GPIO_12] = {WICED_P29, WICED_I2C_1_SDA         },

                    [PLATFORM_GPIO_13] = {WICED_P33, WICED_UART_2_TXD        },

                    [PLATFORM_GPIO_14] = {WICED_P34, WICED_UART_2_RXD        },

                    [PLATFORM_GPIO_15] = {WICED_P38, WICED_SPI_1_CLK         },

                };

             

             

            As I mentioned in my previous post, the code is working in transferring the data from Master to the Slave board but the MISO input (P1-D13) of CYW920719Q40EVB_01 (Master) drops the data high-level voltage to about 620 mV which should be read zero by the Master SPI. The slave board produces right voltage on its MISO output (that was confirmed by disconnecting MISO wire between the Master and Slave and observing the Slave's MISO voltages on an oscilloscope).

             

            Thanks,

             

            Abi

            • 3. Re: CYW20719 SPI Hardware Issue
              AnjanaM_61

              Hi AbFa_4663241 ,

               

              Extremely sorry that I missed this thread. Are you still facing this issue?

              Can you please confirm the status?

              Have you tried with SDK 6.4?

               

              Regards,

              Anjana

              1 of 1 people found this helpful
              • 4. Re: CYW20719 SPI Hardware Issue
                AbFa_4663241

                Hi Anjana,

                 

                P1 does not work as MISO, I even purchased another similar evaluation board with the same problem. The problem was fixed when I changed the MISO from P1 to P4. There should be a routing issue with the chip to connect P1 to MISO of the SPI peripheral.