13 Replies Latest reply on Jan 12, 2018 8:53 AM by e.pratt_1639216

    cyble-22001 SPI read problem

    venu82450_3009436

      Hi sir i am interfacing cyble 22001 with Thermocouple ic USING SPI.But while reading data i am getting only 0xff.

       

      my code is here.

       

      uint8  MAX31856_Read_Data(uint8 Reg_Addr)

      {

      uint8_t ReadData = 0;

          uint8_t dummy = 0;

          SPIM_SpiUartClearRxBuffer();

          SPIM_SpiUartWriteTxData(Reg_Addr);

          while (!SPIM_SpiUartGetRxBufferSize());

          dummy  = SPIM_SpiUartReadRxData();

           SPIM_SpiUartWriteTxData(0xFF);//writing Dummy Data

          while (!SPIM_SpiUartGetRxBufferSize());

          ReadData = SPIM_SpiUartReadRxData(); // Read Data

          return ReadData;

         }

       

      if  i am using this while(!(SPIM_ReadTxStatus() & SPIM_STS_SPI_DONE));  compiler unable to find  SPIM_ReadTxStatus()  and SPIM_STS_SPI_DONE)

      generates error. please help me to solve the issue.Thanks in advance..