Other Parts Discussed in Thread: ADS1231
Hello,
My custom board uses an MSP430F5529 that communicates with an ADS1231 vis SPI. I noticed that the SPI clock signal from my MSP430 controller was not outputting anything, so I tested the following code with my MSP430F5529 launchpad to determine whether it was just an issue with my board. However, after uploading the code to the LP and monitoring P3.2 (Clock signal output - USCI_B0 SPI master mode), I once again observed a flat line on my oscilloscope. When I set UCCKPL high in the UCB0CTL0 register, which is supposed to make the polarity high when the clock is inactive, I can see the change to the high state with my oscilloscope, but I still get a flat line.
Is my clock stuck in an inactive state? Do I have to configure the internal clocks first? I tried the same code, but using USCI_A SPI mode instead, and it mostly worked (except that the frequency was only 250 Hz for some reason). Any help is very much appreciated.
#include <msp430.h> 
/**
 * main.c
 */
 
int main(void)
{
    WDTCTL = WDTPW + WDTHOLD;
    P3SEL = BIT1 + BIT2;                                   // configure SPI pins (P3.1 = MISO, P3.2 = SCLK)
    UCB0CTL1 |= UCSWRST;
    UCB0CTL0  |= UCMST + UCSYNC + UCMODE_0 + UCMSB;        // master mode, msb first, synchronous, 3-pin
    UCB0CTL1 |= UCSSEL_2;                                  // select SMCLK
    UCB0BRW = 0x0002;                                      // 2
    UCB0CTL1 &= ~UCSWRST;                                  // initialize SPI interface
	
	return 0;
}
								 
				 
		 
					 
                          