User guide

Redpine Signals, Inc. Proprietary and Confidential. Page 97
R
R
S
S
9
9
1
1
1
1
0
0
-
-
N
N
-
-
1
1
1
1
-
-
2
2
2
2
/
/
2
2
4
4
/
/
2
2
8
8
S
S
o
o
f
f
t
t
w
w
a
a
r
r
e
e
P
P
r
r
o
o
g
g
r
r
a
a
m
m
m
m
i
i
n
n
g
g
R
R
e
e
f
f
e
e
r
r
e
e
n
n
c
c
e
e
M
M
a
a
n
n
u
u
a
a
l
l
V
V
e
e
r
r
s
s
i
i
o
o
n
n
4
4
.
.
1
1
5
5
4.2 Bit ordering of SPI transmission/reception
8-bit mode
If a sequence of bytes <B3[7:0]> <B2[7:0]> <B1[7:0]> <B0[7:0]> is to be sent,
where B3 is interpreted as the most significant byte, then the sequence of
transmission is as follows :
B0[7] ..B0[6] .. B0[0] -> B1[7] ..B1[6] ..B1[0] -> B2[7] ..B2[6] .. B2[0] -> B3[7] ..B3[6] ..
B3[0]
B0 is sent first, then B1, then B2 and so on.
In each of the bytes, the MSB is sent first. For example, when B0 is sent, B0[7] is
sent first, then B0[6], then B0[5] and so on. Same is the case when receiving data.
In this example, B0[7] is expected first by the receiver, then B0[6] and so on. Also,
as can be seen, the data changes value at the falling edge and is latched at the rising
edge.
Figure 16: 8-bit mode
32-bit mode
If a sequence of 32-bit words is <W3[31:0]> <W2[31:0]> <W1[31:0]>
<W0[31:0]> is to be sent, where W3 is interpreted as the most significant word,
then the sequence of transmission is as follows :
W0[31] ..W0[30] ..W0[0] -> W1[31] ..W1[30] ..W1[0] -> W2[31] ..W2[30] ..W2[0] -> W3[31]
..W3[30] ..W3[0]
W0 is sent first, then W1, then W2 and so on.
In each of the 32-bit words, the MSB is sent first. For example, when W0 is sent,
W0[31] is sent first, then W0[30], then W0[29] and so on. Same is the case when
receiving data. In this example, W0[31] is expected first by the receiver, then
W0[30] and so on. Also, as can be seen, the data changes value at the falling edge
and is latched at the rising edge.
B0
[7]
B0
[6]
B0
[5]
B0
[4]
B0
[3]
B0
[2]
B0
[1]
B0
[0]
B1
[7]
B1
[6]
B1
[5]
B1
[4]
B1
[3]
B1
[2]
B1
[1]
B1
[0]
B0
[7:0]
B1
[7:0]
sclk
cs
data