NUC970 Technical Reference Manual
Publication Release Date: Dec. 15, 2015
- 536 -
Revision V1.30
NUC97
0
T
E
CHNIC
A
L
RE
F
E
RE
N
CE
MA
NUA
L
5.19.3 Block Diagram
mw_sclk_o
mw_int_o
mw_ss_o[1:0]
mw_so_o
mw_si_i
pclk
preset_n
paddr
pwrite
psel
penable
pwdata
pben
prdata
I/O
Decoder
Registers
Clock
Generator
Tx/Rx
Buffer
SPI Core Logic
A
M
B
A
A
P
B
I
n
te
r
fa
c
e
Figure 5.19-1 SPI Block Diagram
Pin descriptions:
mw_sclk_o: SPI serial clock output pin.
mw_int_o:
SPI interrupt signal output.
mw_ss_o:
SPI slave/device select signal output.
mw_so_o:
SPI serial data output pin (to slave device).
mw_si_i:
SPI serial data input pin (from slave device).
5.19.4 Basic Configuration
Before using SPI
functionality, it’s necessary to configure I/O pins as the SPI function and enable
SPI
’s clock.
Write 0xB to MFP_GPB6 (SYS_GPB_MFPL[27:24]), MFP_GPB7 (SYS_GPB_MFPL[31:28]),
MFP_GPB8
(SYS_GPB_MFPH[3:0]),
MFP_GPB9
(SYS_GPB_MFPH[7:4]),
MFP_GPB10
(SYS_GPB_MFPH[11:8]) and MFP_GPB11 (SYS_GPB_MFPH[15:12]) configures pin PB.6, PB.7,
PB.8, PB.9, PB.10 and PB.11 to be SPI0_SS0, SPI0_CLK, SPI0_DATA0, SPI0_DATA1, SPI0_DATA2
and SPI0_DATA3 resepctively.
Write 0xB to MFP_GPB12 (SYS_GPB_MFPH[19:16]), MFP_GPB13 (SYS_GPB_MFPH[23:20]),
MFP_GPB14 (SYS_GPB_MFPH[27:24]), MFP_GPB15 (SYS_GPB_MFPH[31:28]), MFP_GPG4
(SYS_GPG_MFPL[19:16]) and MFP_GPG5 (SYS_GPG_MFPL[23:20]) configures pin PB.12, PB.13,
PB.14, PB.15, PG.4 and PG.5 to be SPI1_SS0, SPI1_CLK, SPI1_DATA0, SPI1_DATA1,
SPI1_DATA2 and SPI1_DATA3 resepctively.