PSoC CY8CTMG20x and CY8CTST200 TRM, Document No. 001-53603 Rev. *C
149
SPI
Control Register
18.2.3
SPI_CR Register
The SPI Control Register (SPI_CR) is the SPI’s control reg-
ister.
Bit 7: LSb First.
This bit determines how the serial data is
shifted out, either LSb or MSb first.
Bit 6: Overrun.
This status bit indicates whether or not
there was a receive buffer overrun. A read from the receive
buffer after each received byte must be performed before
the reception of the next byte in order to avoid an overrun
condition.
Bit 5: SPI Complete.
This status bit indicates the comple-
tion of a transaction. A read from this register clears this bit.
Bit 4: TX Reg Empty.
This status bit indicates whether or
not the Transmit register is empty.
Bit 3: RX Reg Full.
This status bit indicates a Receive reg-
ister full condition.
Bit 2: Clock Phase.
This bit determines the edge (rising or
falling) on which the data changes.
Bit 1: Clock Polarity.
This bit determines the logic level
the clock codes to in its idle state.
Bit 0: Enable.
This bit enables the SPI block.
For additional information, refer to the
18.2.3.1
SPI Control Register Definitions
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Access
0,2Bh
LSb First
Overrun
SPI
Complete
TX Reg
Empty
RX Reg Full
Clock
Phase
Clock
Polarity
Enable
# : 00
LEGEND
#
Access is bit specific. Refer to the register detail for additional information.
Table 18-4. SPI Control Register Descriptions
Bit #
Name
Access
Description
7
LSb First
Read/Write
0 = Data shifted out MSb First.
1 = Data shifted out LSb First.
6
Overrun
Read Only
0 = No overrun.
1 = Indicates new byte received before previous one is read.
5
SPI Complete
Read Only
0 = Transaction in progress.
1 = Transaction is complete. Reading SPI_CR clears this bit.
4
TX Reg Empty
Read Only
0 = TX register is full.
1 = TX register is empty. Writing SPI_TXR register clears this bit.
3
RX Reg Full
Read Only
0 = RX register is not full.
1 = RX register is full. Reading SPI_RXR register clears this bit.
2
Clock Phase
Read/Write
0 = Data changes on trailing edge.
1 = Data changes on leading clock edge.
1
Clock Polarity
Read/Write
0 = Non-inverted, clock idles low (modes 0, 2).
1 = Inverted, clock idles high (modes 1, 3).
0
Enable
Read/Write
0 = Disable SPI function.
1 = Enable SPI function.
Summary of Contents for PSoC CY8CTMG20 Series
Page 4: ...4 Contents Overview Feedback...
Page 26: ...26 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Section B PSoC Core Feedback...
Page 82: ...82 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Sleep and Watchdog Feedback...
Page 134: ...134 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C I2C Slave Feedback...
Page 142: ...142 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C System Resets Feedback...
Page 160: ...160 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C SPI Feedback...
Page 182: ...182 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Full Speed USB Feedback...
Page 302: ...302 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Glossary Feedback...