
EM358x
Rev. 0.4
89
The SPI slave controller supports various frame formats depending upon the clock polarity (SC_SPIPOL), clock
phase (SC_SPIPHA), and direction of data (SC_SPIORD) (see Table 8-6). The SC_SPIPOL, SC_SPIPHA, and
SC_SPIORD bits are defined within the SCx_SPICFG registers.
Table 8-6. SPI Slave Formats
SCx_SPICFG
Frame Format
SC_SPIxxx
1
MST ORD PHA POL
0
0
0
0
0
0
0
1
0
0
1
0
0
0
1
1
0
1
-
- Same as above except LSB first instead of MSB first
1
The notation xxx means that the corresponding column header below is inserted to form the field name.
8.4.3
Operation
When the slave select (nSSEL) signal is asserted by the master, SPI transmit data is driven to the output pin
MISO, and SPI data is received from the input pin MOSI. The nSSEL pin has to be asserted to enable the
transmit serializer to drive data to the output signal MISO. When the nSSEL pin is deasserted, no data is
transferred on the MISO or MOSI pins and the output pin MISO is tri-stated (when the MISO pin is configured as
Alternate Output (push-pull), SPI Slave MISO Mode). A falling edge on nSSEL resets the SPI slave shift registers.
Characters transmitted and received by the SPI slave controller are buffered in the transmit and receive FIFOs
that are both 4 entries deep. When software writes a character to the SCx_DATA register, it is pushed onto the
transmit FIFO. Similarly, when software reads from the SCx_DATA register, the character returned is pulled from
the receive FIFO. If the transmit and receive DMA channels are used, the DMA channels also write to and read
from the transmit and receive FIFOs.
Characters received are stored in the receive FIFO. Receiving characters sets the SC_SPIRXVAL bit in the
SCx_SPISTAT register, to indicate that characters can be read from the receive FIFO. Characters received while
the receive FIFO is full are dropped, and the SC_SPIRXOVF bit in the SCx_SPISTAT register is set. The receive
FIFO hardware generates the INT_SCRXOVF interrupt, but the DMA register will not indicate the error condition
until the receive FIFO is drained. Once the DMA marks a receive error, two conditions will clear the error
Содержание EMBER EM358 series
Страница 2: ...EM358x 2 Rev 0 4 ...
Страница 7: ...EM358x Rev 0 4 7 ...