AnsweredAssumed Answered

SPI : How to receive 2 bytes of data in KEA128

Question asked by Jashan Mahadevu on Jul 3, 2015
Latest reply on Jul 12, 2015 by Jashan Mahadevu

hi all,

        i am working on SPI in KEA128, since the SPI0_D reg is 8 bits and my slave is sending me 16 bits of data. I am using the following code in KEA128 given below,

master: KEA128

 

            while(SPI_S_SPTEF_MASK){

                  if(SPI0_S & (1<<5))           //  checking for Tx buffer to be empty

                        SPI0_D = TX;              //  to send the data to slave

                  if(SPI0_S & SPI_S_SPRF_MASK){

                        RX = SPI0_D;              //  to receive data in master(KEA128)

                  }

             }

So how should i go through about this ??

Outcomes