Part Number: MSP430FR6007
Other Parts Discussed in Thread: MSP430WARE
I am using the MSP430FR6007IPZ microcontroller and configuring SPI using the UCA2CTLW0 register. However, I am not getting any SPI signals on the oscilloscope (no clock or data activity).
I have checked the hardware connections and SPI pin configuration, but I am still unable to identify the issue.
Could someone please review my SPI initialization code and suggest what might be wrong? Any guidance on properly configuring SPI on the MSP430FR6007 would be greatly appreciated.
Here is my SPI configuration code:
Init_SPI(void)
{
UCA2CTLW0 = UCSWRST; // Hold eUSCI in reset
// SPI pins
P5SEL0 |= BIT0 | BIT1 | BIT2;
P5SEL1 &= ~(BIT0 | BIT1 | BIT2);
// CS pin
P5OUT |=BIT3;
P5DIR |= BIT3;
// CLR pin
P5OUT |= BIT4;
P5DIR |= BIT4;
UCA2CTLW0 |= UCMST | UCSYNC | UCCKPL | UCMSB | UCMODE_1 | UCSTEM;
UCA2CTLW0|=UCSSEL__SMCLK;
UCA2BRW = 0x20;
UCA2CTLW0 &= ~UCSWRST; // Enable SPI
}
smclk = 8 MHz
SMCLK Frequency: (e.g., 8 MHz)

