AnsweredAssumed Answered

SPI Slave questions

Question asked by Carlos Omar Haro Cordero on Dec 19, 2014
Latest reply on Jan 13, 2015 by Carlos Omar Haro Cordero

Hello! Freescale community


I'm learning about SPI and how use the registers.


I have initialized the module as slave mode

I suppose when the master wants communicate with the slave, the slave will get the data via interrupt.


My question is.  When the microprocessor get in the Vspir  interrupt, he can send information to the master?


the other question is if i have wrote well  the interrupt code for the slave. (code below)

interrupt VectorNumber_Vspi void Vspi_ISR (void) {     byte data;                 while (!SPIS_SPRF){};  // Wait until the next byte is received      data = SPID;     pixels[0]=data; }