Most external SPI ic's want a small delay after you set its nCS and before you start to clock in data.
Setting up a timer for this small 20-100µS delay is over kill
and hard delay loop is a no-no in true state machine programming (and is also dependent on mclk freq)
Solution:
Use a empty spi txbyte to get the delay by masking out the clk output while it "think" it is sending the first byte.
This way the SPI TX IRQ is in charge of the delay.
Use PULL Resistor ENABLE to override the USCI SPI CLK
1 byte = 8µS delay (if spi clk is 1MHz)
bis.b #BIT5,&P1REN ; enable for now
bis.b #BIT5,&P1OUT ; clear or set depending on clk phase at rest
bis.b #BIT5+BIT6+BIT7,&P1SEL ; P1.x set as SPI pins (datasheet page 49)
bis.b #BIT5+BIT6+BIT7,&P1SEL2 ; P1.x set as SPI pins
I guess you could do the same for MOSI, though if you always write 0x00 or 0xff to it while "delaying" it will not toggle.
and even if toggling it should not cause any harm.
Start your spi_cnt with a negative number (-2 for double the delay etc) and when it hits zero, enable the clk
USCIB0_TX_ISR
inc.w &spi_cnt
if_z bic.b #BIT5,&P1REN ; did it wrap around to 0? enable spi clk
cmp.w &spi_cnt,&spi_len ; sent all bytes yet?
This could also be used for a empty last byte, as when TX IFG is set does not mean the byte got sent yet.
Though right now I use RX_IRQ for that, so I will do some more testing to see what is best.
Apparently PREN disables the module pin driver on most msp430, except these below
On some I/O ports on the MSP430F261x and MSP430F241_6/7/8/9
enabling the pullup/pulldown resistor (PxREN = 1) while the module function is selected (PxSEL = 1)
does not disable the logic output driver.