
M0A21/M0A23 Series
May 06, 2022
Page
533
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
frequency, f
PCLK
, of SPI Slave device must be 5-times faster than the serial bus clock rate of the SPI
Master device connected together (i.e. the clock rate of serial bus clock < 1/5 peripheral clock
𝑓
𝑃𝐶𝐿𝐾
in
Slave mode).
In SPI protocol, SCLKMODE (USPI_PROTCTL[7:6]) defines not only the idle state of serial bus clock
but also the serial clock edge used for transmit and receive data. Both Master and Slave devices on the
same communication bus should have the same SCLKMODE configuration. The four kinds of serial bus
clock configuration are shown below.
SCLKMODE [1:0]
SPI Clock Idle State
Transmit Timing
Receive Timing
0x0
Low
Falling edge
Rising edge
0x1
Low
Rising edge
Falling edge
0x2
High
Rising edge
Falling edge
0x3
High
Falling edge
Rising edge
Table 6.14-1 Serial Bus Clock Configuration
Figure 6.14-6 SPI Communication with Different SPI Clock Configuration (SCLKMODE=0x0)
Data N
Data (N+1)
Data Frame
SPI_SS
(USCIx_CTL0)
SPI_MOSI
(USCIx_DAT0)
SPI_CLK
(USCIx_CLK)
SPI_MISO
(USCIx_DAT1)
MSB
TX[n]
TX
[n-1]
LSB
TX[0]
LSB
RX[0]
RX
[n-1]
MSB
RX[n]
MSB
TX[n]
TX
[n-1]
LSB
TX[0]
LSB
RX[0]
RX
[n-1]
MSB
RX[n]
Note:
x = 0, 1
USCI_PROTCTL[0] = 0;
USCI_PROTCTL[7:6] = 0x0;
USCI_CTLIN0[2] = 1;
USCI_LINECTL[0] = 0;
USCI_LINECTL[7] = 1;