this is my C code for the slave
void spi_init(void)
{
//SpiaRegs.SPICCR.all = 0x0007; //Data is ready on rising edge), loopback is off, 8-bit data
SpiaRegs.SPICTL.all = 0x000A; //Normal SPI clocking scheme(Data in latch on rising edge)slave, 4-pin option, No interrupt
SpiaRegs.SPICTL.bit.CLK_PHASE = 1;
SpiaRegs.SPIBRR = 0x0077; //BateRate 0.5MHz
SpiaRegs.SPICCR.all = 0x0087; //SPI is ready to transmit or receive the next character.
SpiaRegs.SPICCR.bit.CLKPOLARITY = 0; //0
SpiaRegs.SPIPRI.bit.FREE = 1;
}
but this code doesnt work ;(