1 Reply Latest reply on Aug 15, 2017 11:27 PM by bmah

    SPI communication

    robert.mcinerney.external_2561216

      Hello,

         

      I am trying to communicate with a transceiver over SPI. I am using 16 bit values to transmit data over miso and mosi. I have a sallie logic analyzer that shows that sallie is reading the right values being exchanged. However, when I try to read these values from the SPI Master I am not getting values that make sense or match the Sallie commands that are on MISO. I am using an interrupt that fires when the buffer is not empty. This value will read to a data structure. 

         

       

         

      For example:

         

      CY_ISR(RX_INTERUPT_Interrupt)
      {
          /*  Place your Interrupt code here. */
          /* `#START RX_INTERUPT_Interrupt` */
         
               TS_one->Read = SPIM_1_ReadRxData();//store response in TS2 array
              
              
          /* `#END` */
      }

         

      I send a command like SPIM_1_WriteTxData(0x9700);

         

      Then I want to get what comes back on MISO to be stored in TS_one->Read. I know the right data is sent back due to using Sallie. After the data is written to TS_one I will move it into a different variable and loop again.