參數(shù)資料
型號: ST52F514F3M6
英文描述: IC MAX 7000 CPLD 256 256-FBGA
中文描述: 微控制器
文件頁數(shù): 97/106頁
文件大小: 648K
代理商: ST52F514F3M6
ST52F510/F513/F514
97/106
15.4.2 Slave Configuration.
In slave configuration, the serial clock is received
on theSCK pin from the master device.
The value of the SPR0, SPR1 and SPR2 bits is not
used for data transfer.
Procedure
– For correct data transfer, the slave device must
be in the same timing mode as the master de-
vice (CPOL and CPHA bits). See Figure 15.4.
– The SS pin must beconnected to alow level sig-
nal during the complete byte transmit sequence.
– Clear the MSTR bit and set the SPE bit to assign
the pins to alternate function.
In this configuration the MOSI pin is a data input
and the MISO pin is a data output.
Transmit Sequence
The data byte is loaded into the 8-bit shift register
(from the internal bus) during a write cycle and
then shifted out serially to the MISO pin most
significant bit first.
The transmit sequence begins when the slave
device receives the clock signal and the most
significant bit of the data on its MOSI pin.
When data transfer is complete:
– The SPIF bit is set by hardware
– An interrupt is generated if SPIE bit is set.
During the last clock cycle the SPIF bit is set, a
copy of the data byte received in the shift register
is moved to a buffer. When the SPI_IN register is
read, the SPI peripheral returns the buffer value.
The SPIF bit is cleared by the following software
sequence:
1. An access to the SPI_STATUS_CR register
while the SPIF bit is set.
2. A read to the SPI_IN register.
Note:
While the SPIF bit is set, all writes to the
SPI_OUT
register
are
SPI_STATUS_CR register is read.
inhibited
until
the
The SPIF bit can be cleared during a second
transmission; however, it must be cleared before
the secondSPIF bit in order to prevent an overrun
condition (see Section 15.4.6).
Depending on the CPHA bit, the SS pin has to be
set to write to the SPI_OUT register between each
data byte transfer to avoid a write collision (see
Section 15.4.4).
15.4.3 Data Transfer Format.
During an SPI transfer, data is simultaneously
transmitted (shifted out serially) and received
(shifted in serially). The serial clock is used to
synchronize data transfer during a sequence of
eight clock pulses.
The SS pin allows individual selection of a slave
device; the other slave devices that are not
selected do not interfere with SPI transfer.
Clock Phase and Clock Polarity
Four possible timing relationships may be chosen
by software, using the CPOL and CPHA bits.
The CPOL (clock polarity) bit controls the steady
state value of the clock when data isn’t being
transferred. This bit affects both master and slave
modes.
The combination between the CPOL and CPHA
(clock phase) bits select the data capture clock
edge.
Figure 15.4, shows an SPI transfer with the four
combinations of the CPHA and CPOL bits. The
diagram may be interpreted as a master or slave
timing diagram where the SCK pin, the MISO pin,
the MOSI pin are directly connected between the
master and the slave device.
The SS pin is the slave device selectinput and can
be driven by the master device.
The master device applies data to its MOSI pin-
clock edge before the capture clock edge.
CPHA bit is set
The second edge on the SCK pin (falling edge if
the CPOL bit is reset, rising edge if the CPOL bit is
set) isthe MSBit capturestrobe. Data is latched on
the occurrence of the second clock transition.
A write collision should notoccur even if the SS pin
stays low during a transfer of several bytes (see
Figure 15.3).
CPHA bit is reset
The first edge on the SCK pin (falling edge if CPOL
bit is set, rising edge if CPOL bit is reset) is the
MSBit capture strobe. Data is latched on the
occurrence of the first clock transition.
The SS pin must be toggledhigh and low between
each byte transmitted (see Figure 15.3).
In order to protect the transmission from a write
collision alow value on the SS pin ofa slavedevice
freezes the data in its SPI_OUT register and does
not allow it to be altered. Therefore, the SS pin
must be high to write a new data byte in the
SPI_OUT without producing a write collision.
15.4.4 Write Collision Error.
A write collision occurs when the software tries to
write to theSPI_OUT registerwhile a datatransfer
相關(guān)PDF資料
PDF描述
ST52F514G0B6 IC MAX 7000 CPLD 256 256-FBGA
ST52F514G0M6 IC MAX 7000 CPLD 64 100-TQFP
ST52F514G1B6 IC MAX 7000 CPLD 64 100-TQFP
ST52F514G1M6 IC MAX 7000 CPLD 64 44-PLCC
ST52F514G3B6 IC MAX 7000 CPLD 64 44-TQFP
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
ST52F514FMB6 制造商:STMICROELECTRONICS 制造商全稱:STMicroelectronics 功能描述:8-BIT INTELLIGENT CONTROLLER UNIT ICU Two Timer/PWMs, ADC, I2C, SPI, SCI
ST52F514FMM6 制造商:STMICROELECTRONICS 制造商全稱:STMicroelectronics 功能描述:8-BIT INTELLIGENT CONTROLLER UNIT ICU Two Timer/PWMs, ADC, I2C, SPI, SCI
ST52F514G0B6 制造商:未知廠家 制造商全稱:未知廠家 功能描述:Microcontroller
ST52F514G0M6 制造商:未知廠家 制造商全稱:未知廠家 功能描述:Microcontroller
ST52F514G1B6 制造商:未知廠家 制造商全稱:未知廠家 功能描述:Microcontroller