![Analog Devices Blackfin ADSP-BF537 Скачать руководство пользователя страница 635](http://html.mh-extra.com/html/analog-devices/blackfin-adsp-bf537/blackfin-adsp-bf537_hardware-reference-manual_2939700635.webp)
ADSP-BF537 Blackfin Processor Hardware Reference
10-29
SPI Compatible Port Controllers
is cleared shortly after the start of a transfer (
SPISS
going low for
CPHA = 0
, first active edge of
SCK
on
CPHA = 1
), and is set at the same time
as
RXS.
For a master device,
SPIF
is cleared shortly after the start of a
transfer (either by writing the
SPI_TDBR
or reading the
SPI_RDBR
, depend-
ing on
TIMOD
), and is set one-half
SCK
period after the last
SCK
edge,
regardless of
CPHA
or
CPOL
.
The time at which
SPIF
is set depends on the baud rate. In general,
SPIF
is
set after
RXS
, but at the lowest baud rate settings (
SPI_BAUD < 4
). The
SPIF
bit is set before
RXS
is set, and consequently before new data is
latched into
SPI_RDBR
, because of the latency. Therefore, for
SPI_BAUD = 2
or
SPI_BAUD = 3
,
RXS
must be set before
SPIF
to read
SPI_RDBR
. For larger
SPI_BAUD
settings,
RXS
is guaranteed to be set before
SPIF
is set.
If the SPI port is used to transmit and receive at the same time, or to
switch between receive and transmit operation frequently, then the
TIMOD
=
00
mode may be the best operation option. In this mode, software
performs a dummy read from the
SPI_RDBR
register to initiate the first
transfer. If the first transfer is used for data transmission, software should
write the value to be transmitted into the
SPI_TDBR
register before per-
forming the dummy read. If the transmitted value is arbitrary, it is good
practice to set the
SZ
bit to ensure zero data is transmitted rather than ran-
dom values. When receiving the last word of an SPI stream, software
should ensure that the read from the
SPI_RDBR
register does not initiate
another transfer. It is recommended to disable the SPI port before the
final
SPI_RDBR
read access. Reading the
SPI_SHADOW
register is not suffi-
cient as it does not clear the interrupt request.
In master mode with the
CPHA
bit set, software should manually assert the
required slave select signal before starting the transaction. After all data
has been transferred, software typically releases the slave select again. If the
SPI slave device requires the slave select line to be asserted for the
complete transfer, this can be done in the SPI interrupt service routine
Содержание Blackfin ADSP-BF537
Страница 42: ...Contents xlii ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 90: ...Development Tools 1 32 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 138: ...Programming Examples 4 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 340: ...SDC Programming Examples 6 84 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 606: ...Programming Examples 9 94 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 660: ...Programming Examples 10 54 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 720: ...Electrical Specifications 11 60 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 840: ...Programming Examples 13 42 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 876: ...Programming Examples 14 36 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 938: ...Programming Examples 15 62 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 958: ...Programming Examples 17 12 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 986: ...Programming Examples 18 28 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 1162: ...G 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 1218: ...Index I 56 ADSP BF537 Blackfin Processor Hardware Reference ...