13 Replies Latest reply on Jul 14, 2015 12:46 PM by MichaelF_56

    SPI over BCM920737TAG_Q32 as master, no MOSI


         I am using a Wiced board BCM920737TAG_Q32 and trying to configure it as a SPI master board. After programming, when I see over the oscilloscope I can see just the SCLK signal of 9MHz but I am not able to see any data that I transmit over MOSI line.


      The CS and MOSI are also configured in the function but I cant see them changing in the O-scope. I am using the example code of spi_pressure_sensor.c for testing the SPI.


      I also did created my own smart design project and check SPI in the configuration. Then I used the sample functions defined in the pdf "WICED Smart Hardware interfaces in the application note" to transmit data over SPI: spiffy2_master_send_receive_byte(UINT8 byteToSend); , I actually declared this function outside of all the functions. and then called it in an interrupt handler. 



      UINT8 spiffy2_master_send_receive_byte(UINT8 byteToSend)


      BYTE byteReceived;

      // SPIFFY2 is now ready to be used.

      // Assert chipselect by driving O/P on the GPIO

      gpio_setPinOutput(CS_PORT, CS_PIN, CS_ASSERT); // Assert chipselect

      // Tx one byte of data

      spiffyd_txData(SPIFFYD_2, 1 ,&byteToSend); // Send a byte

      // Rx one byte of data

      spiffyd_rxData(SPIFFYD_2, 1, &byteReceived); // Read 1 byte

      // Deassert chipselect

      gpio_setPinOutput(CS_PORT, CS_PIN, CS_DEASSERT); // Deassert chipselect

      return byteReceived;