Daisy-Chain Connection; Configuring The Daisy-Chain; Spi Register - CMOSTEK CMT2380F17 Manual

Ultra low power sub-1ghz wireless mcu
Table of Contents

Advertisement

20.4 Daisy-Chain Connection

If SPI0 is defined in slave mode, it can be connected in a daisy-chain configuration. The first slave output
is connected to the second slave input, the second slave output is connected to the third slave input, and so
on. The final slave output is connected to the master input. Each slave sends out, during a second group of
clock pulses, an exact copy of what was received during the first group of clock pulses. The whole chain acts
as one large communication shift register. The daisy-chain feature only requires a single Slave Select line
(nSS) from the master device.
Figure 20–9. SPI single master multiple slaves configuration

20.4.1 Configuring the Daisy-Chain

How to Configure SPI Slave in Daisy-Chain
Configure SPCON to define the data mode and select SPI0 in slave mode.
Set SPI0M0 (AUXR7.4) to enable SPI0 in Daisy-Chain mode.
Service SPIF to get daisy-chain communication.。

20.5 SPI Register

The following special function registers are related to the SPI operation:
SPCON:SPI Control Register
SFR Page
= 0~F
SFR Address = 0x85
Bit
7
Name
SSIG
R/W
R/W
Reset V alue
0
Bit 7: SSIG, nSS is ignored.
0: The nSS pin decides whether the device is a master or slave. 1: MSTR decides whether the device is a
master or slave.
Bit 6: SPEN, SPI enable.
0: The SPI interface is disabled and all SPI pins will be general-purpose I/O ports. 1: The SPI is enabled.
Bit 5: DORD, SPI data order.
0: The MSB of the data byte is transmitted first. 1: The LSB of the data byte is transmitted first.
Bit 4: MSTR, Master/Slave mode select 0: Selects slave SPI mode.
1: Selects master SPI mode.
6
5
SPEN
DORD
R/W
R/W
0
0
Rev0.1 | 254/347
4
3
MSTR
CPOL
R/W
R/W
0
0
CMT2380F17
2
1
CPHA
SPR1
R/W
R/W
1
0
www.cmostek.com
0
SPR0
R/W
0

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CMT2380F17 and is the answer not in the manual?

Questions and answers

Table of Contents