88
10.2
SPI1
CW6632B Bluetooth 3.0 Audio Player SOC
Version 1.0.0
Copyright ©2015, www.appotech.com. All Rights Reserved.
10.2.1
SPI1 Special Function Registers
Register 10
–7 SPI1CON – SPI1 Configure Register
Position
7
6
5
4
3
2
1
0
Name
SPI1PND
DMAERR
SPI1RT
SPI1WS
SPI1DEC
-
SPI1EN
Default
1
0
0
0
0
0
0
0
Access
R/W
R/W
R/W
R/W
R/W
RO
RO
R/W
SPI1PND
: SPI1 Pending bit (read only, writing SPI1BUF will clear this bit)
0 = Transmission has not finished
1 = Transmission finish
DMAERR:
SPI1 DMA Error flag
0 = No DMA error
1 = DMA error happened.
SPI1RT
: SPI1 RX/TX select bit in 2-wire or DMA mode
0 = TX
1 = RX
In 3-wire mode, SPI1 can both Transmit and receive at the same time. But if we use DMA mode or 2-wire mode, just
one direction (TX or RX) is allowed. Use this bit to select TX or RX.
SPI1WS
: SPI1 2-wire mode/3-wire mode select bit
0 = 3-wire mode
1 = 2-wire mode
SPI1DEC
:SPI1 decryption function enables
0 = Disabled
1 = Enabled
SPI1EN
: SPI1 enable bit
0 = SPI1 disabled
1 = SPI1 enabled
Register 10
–8 SPI1CON1 – SPI1 Configure Register1
Position
7
6
5
4
3
2
1
0
Name
-
-
-
-
-
-
CRCEN
ENCRYPT
Default
-
-
-
-
-
-
0
0
Access
-
-
-
-
-
-
R/W
R/W
CRCEN
: SPI1 CRC enable when SPI1 receiving data
0 = Disabled
1 = Enabled
ENCRYPT
: SPI1 output encryption function enable
0 = Disabled
1 = Enabled
NOTE: ENCRYPT and SPI1DEC cannot be 1 at the same time.