8SPI1 27
Copyright © 2018, www. bluetrum.com. All Rights Reserved
27
8 SPI1
8.1 Features
SPI1 can support different mode
1. general 3 wire mode, 1-bit clock in/out, 1-bit data output, 1-bit data input
2. 2 wire mode, 1-bit clock in/out, 1-bit data output or input;
3. 2 data bus mode, 1-bit clock in/out, 2-bit data output or input;
8.2 SPI1 Special Function Registers
Register 8-1SPI1CON: SPI1 Control Register
SPI pending
0: not finish SPI rx/tx
1: finish SPI rx/tx
SPI output data and sample data is at the same edge
0: disable
1: enable
SPI multiple bit bus enable bit
0: disable
1: enable
SPI LFSR enable bit
0: disable
1: enable
SPI interrupt enable
0: disable
1: enable
SPI sampling edge select bit, when SPIOSS = 0, output data and
sample data is at different clock edge; when SPIOSS = 1, output
data and sample data is at the same clock edge
0: falling edge output data;
1: rising edge output data;
SPI clock state when idle
0: clock stay at 0
1: clock stay at 1
When in DMA mode or 2-wire mode, configure SPI Receive or
Transmit select bit