Other Parts Discussed in Thread: MSP430WARE
Tool/software:
I have write the following code for SPI configuration but can't able to receive the data from the master
void spi_init(void)
{
P3SEL |= BIT0; // SOMI
P3SEL |= BIT1; // SIM0
P3SEL |= BIT2; // CLK
P2SEL |= BIT7; //CS
//P2DIR &= ~(BIT7) ; // Slave Select
UCB0CTL1 |= UCSWRST; // **Put state machine in reset**
UCB0CTL0 |= UCMODE_2+UCSYNC+UCCKPL+UCMSB; // 4-pin, 8-bit SPI Slave 0 enabled
// Clock polarity high, MSB
UCB0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
UCB0IE |= UCRXIE; // Enable USCI_B0 RX interrupt
}