This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430G2553: SPI B with 25LC1024

Part Number: MSP430G2553

Why is the MSP430 clocking after the CS goes high again?

This is my configuration:

    UCB0CTL1 |= UCSWRST;           // Put in reset
    UCB0CTL0 |= UCMST + UCSYNC + UCCKPH + UCMSB; // SPI Master, Sync, MSB
    UCB0CTL1 |= UCSSEL_3;          // SMCLK
    UCB0BR0 = 16;                // SPI Speed (SMCLK/2)
    UCB0BR1 = 0;
    IFG2 &= ~UCB0TXIFG;
    IFG2 &= ~UCB0RXIFG;
    UCB0CTL1 &= ~UCSWRST;          // Release reset

This is how I transmit:

    P2OUT &= ~BIT5;                                 // Clear Chip Select (activate)

    while (!(IFG2 & UCA0TXIFG));           // Wait for TX buffer
    UCA0TXBUF = data;                      // Send data
    while (!(IFG2 & UCA0RXIFG));           // Wait for RX complete
    return UCA0RXBUF;                      // Return received data

    CLK after CS.pngP2OUT |= BIT5;                                  // Set Chip Select (deactivate)

**Attention** This is a public forum