8 Replies Latest reply on Feb 28, 2019 1:49 AM by AnjanaM_61

    Unable to set the CYW920706WCDEVAL dev kit as spi slave

    igloc_3085191

      Hi all,

       


       

      I am having troubles trying to configure the CYW920706WCDEVAL dev kit as spi slave. On the Wiced Studio 6.2 SDK, I could not find any example that implements a spi slave.

       

      So I have tried to use the code snippet and configuration that comes on the  CYW920706WC DEVAL Hardware User Guide (Section 10.3). Unfortunately that configuration will not worked. I have also tried most of the configurations that comes within the SDK, on the spiffydriver.h (up to 87 possible configurations there).

       

      I have throughly tested the following:

       

      - SPI master device sends data correctly. Tested on scope (CS, CLK and MOSI). Also it works perfectly with a thrid party spi slave device.

      - I have checked several times that the connections are correctly set as the recommended configuration (hw guide).

      - The spi slave library init is correctly call on initialization. I can see the traces via UART.

      - There are no other GPIOs used on the code.

       

      I have attached the spi master files that I use on the project. Also on the application main code, the following functions are called:

       

       

                  nov_spi_slave_init();

       

                  spi_register_tx_rx_handler(nov_spi_slave_handle_tx_and_rx);    

                  nov_spi_slave_register_data_received_cb(nov_spi_slave_data_received);

       

       

      When the data is called the MOSI line is held high. The callback function is not reached at any point.

       

      I have attached the spi_slave code that I have put together.

       

       

      Any help will be most welcome. Please let me know if you need any other further info.

       

      Thanks