NUC970 Technical Reference Manual
Publication Release Date: Dec. 15, 2015
- 537 -
Revision V1.30
NUC97
0
T
E
CHNIC
A
L
RE
F
E
RE
N
CE
MA
NUA
L
Write 0xB to MFP_GPI5 (SYS_GPI_MFPL[23:20]), MFP_GPI6 (SYS_GPI_MFPL[27:24]), MFP_GPI7
(SYS_GPI_MFPL[31:28]) and MFP_GPI8 (SYS_GPI_MFPH[3:0]) configures pin PI.5, PI.6, PI.7 and
PI.8 to be SPI1_SS0, SPI1_CLK, SPI1_DATA0 and SPI1_DATA1 resepctively.
Please note that configure different pins to be same functionality is prohibited. For example, please
don
’t configure PB.14 and PI.6 to be SPI1_DATA0 functionality in the same time.
To enable SPI
’s clock, please refer to register CLK_PCLKEN1. Set SPI0 (CLK_PCLKEN1[4]) high to
enable SPI0 clock while set SPI1 (CLK_PCLKEN1[5]) high to enable SPI1 clock.
5.19.5 Function Description
This SPI controller can be set as Master to communicate with the off-chip SPI slave device.
It can generate an interrupt signal when data transfer is finished and can be cleared by writing 1 to the
interrupt flag.
The active level of device/slave select signal can be chosen to low active or high active, which
depends on the peripheral it’s connected.
Writing a divisor into DIVIDER register can program the frequency of serial clock output. This master
core contains four 32-bit transmit/receive buffers, and can provide burst mode operation. The
maximum bits can be transmitted/received is 32 bits, and can transmit/receive data up to four times
successive.
It also supports Dual IO and Quad IO transfer mode.
Operation Setting Description
5.19.5.1
Clock Polarity
The CLK_POL bit (CNTRL[31]) defines the SPI clock idle state. If CLK_POL = 1, the output SPI clock
is idle at high state; if CLK_POL = 0, it is idle at low state.
Transmit/Receive Number
This Tx_NUM (CNTRL[9:8] specifies how many transmit/receive numbers should be executed in one
transfer.
Transmit/Receive Bit Length
The bit length of a transaction word is defined in Tx_BIT_LEN bit field (CNTRL[7:3]) and can be
configured up to 32-bit length in a transaction word for transmitting and receiving.
LSB/MSB First
The LSB bit (CNTRL[10]) defines the bit transfer sequence in a transaction. If the LSB bit is set to 1,
the transfer sequence is LSB first. The bit 0 will be transferred firstly. If the LSB bit is cleared to 0, the
transfer sequence is MSB first.
Edge
The TX_NEG bit (CNTRL[2]) defines the data transmitted out either on negative edge or on positive
edge of SPI clock.
The Rx_NEG bit (CNTRL[1]) defines the data received either on negative edge or on positive edge of
SPI clock.
Note:
The settings of TX_NEG and RX_NEG are mutual exclusive. In other words, do not transmit
and receive data at the same clock edge.
Suspend Interval