![Texas Instruments TMS470R1x Скачать руководство пользователя страница 20](http://html.mh-extra.com/html/texas-instruments/tms470r1x/tms470r1x_reference-manual_1097091020.webp)
MibSPI Operation Modes
12
2.5
Data Format
2.5.1
Compatibility Mode with TMS470 SPI
In compatibility mode, the data formats for the three-, four- and five-pin
options are identical.
CHARLEN[4:0] (SPICTRL1.4-0) specifies the number of bits (one to 16) in
the data word. The CHARLEN[4:0] value directs the state control logic to
count the number of bits received or transmitted to determine when a
complete word is processed.
Data word length
must
be programmed in
master mode
and in
slave mode
.
The following conditions apply for words with fewer than 16 bits:
❏
Data must be left-justified when it is written to the MibSPI for transmission
❏
Data is right-justified when read back from the receive register
The buffer contains the most recently received word, right-justified, plus any
bits that are left over from previous transmissions that have been shifted to
the left. The diagram below shows how a 14-bit word is stored in the buffer
once it is received.
In transmit mode, the SPIBUF register contains the most recently transmit-
ted word, left-justified. The diagram below shows how a 14-bit word needs to
be written to the buffer in order to be transmitted correctly.
To allow for the efficient transmission of byte-sized words, if a character
length is programmed for 8 bits or less, the SDPDAT[7] bit instead of SDP-
DAT[15] is the source of the serial out data. This prevents the need to further
add eight justification bits.
2.5.2
Multi-buffer Mode (MibSPI)
To support different types of slaves in one MibSPI network, four independent
data word formats are implemented that allow configuration of individual data
word length, polarity, phase and bit rate. For each buffer, the user can select
which data format to use via the bits DFSEL[1:0] in the control field for one of
the four data word formats.
Bits D15
D14
D13
D12
D11
D10
D9
D8
D7
D6
D5
D4
D3
D2
D1
D0
X
X
1
0
1
0
1
0
1
0
1
0
1
0
1
0
Bits D15
D14
D13
D12
D11
D10
D9
D8
D7
D6
D5
D4
D3
D2
D1
D0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
X
X
Содержание TMS470R1x
Страница 2: ...2 ...