USCI Operation: SPI Mode
20-6
Universal Serial Communication Interface, SPI Mode
20.3.1 USCI Initialization and Reset
The USCI is reset by a PUC or by the UCSWRST bit. After a PUC, the
UCSWRST bit is automatically set, keeping the USCI in a reset condition.
When set, the UCSWRST bit resets the UCxRXIE, UCxTXIE, UCxRXIFG,
UCOE, and UCFE bits and sets the UCxTXIFG flag. Clearing UCSWRST
releases the USCI for operation.
Note: Initializing or Re-Configuring the USCI Module
The recommended USCI initialization/re-configuration process is:
1) Set UCSWRST (
BIS.B #UCSWRST,&UCxCTL1
)
2) Initialize all USCI registers with UCSWRST=1 (including UCxCTL1)
3) Configure ports.
4) Clear UCSWRST via software (
BIC.B #UCSWRST,&UCxCTL1
)
5) Enable interrupts (optional) via UCxRXIE and/or UCxTXIE
20.3.2 Character Format
The USCI module in SPI mode supports 7- and 8-bit character lengths
selected by the UC7BIT bit. In 7-bit data mode, UCxRXBUF is LSB justified
and the MSB is always reset. The UCMSB bit controls the direction of the
transfer and selects LSB or MSB first.
Note:
Default Character Format
The default SPI character transmission is LSB first. For communication with
other SPI interfaces it MSB-first mode may be required.
Note:
Character Format for Figures
Figures throughout this chapter use MSB first format.
Summary of Contents for MSP430x4xx Family
Page 1: ...MSP430x4xx Family 2007 Mixed Signal Products User s Guide SLAU056G ...
Page 2: ......
Page 6: ...vi ...
Page 114: ...3 76 RISC 16 Bit CPU ...
Page 304: ...5 20 FLL Clock Module ...
Page 340: ...7 8 Supply Voltage Supervisor ...
Page 348: ...8 8 16 Bit Hardware Multiplier ...
Page 372: ...9 24 32 Bit Hardware Multiplier ...
Page 400: ...10 28 DMA Controller ...
Page 428: ...13 10 Basic Timer1 ...
Page 466: ...15 24 Timer_A ...
Page 522: ...17 30 USART Peripheral Interface UART Mode ...
Page 544: ...18 22 USART Peripheral Interface SPI Mode ...
Page 672: ...23 12 Comparator_A ...
Page 692: ...24 20 LCD Controller ...
Page 746: ...26 28 ADC12 ...