
MOTOROLA
MC68341 USER’S MANUAL
9- 37
for SPI master arbitration; however, the system software must implement the arbitration.
Note that unlike previous SPI systems, e.g., on the M68HC11 Family, MSTR is not
cleared by a mode fault being set nor are the QSPI pin output drivers disabled; however,
the QSPI is disabled when software clears SPE in QSPI register SPCR1.
Normally, the SPI bus performs simultaneous bidirectional synchronous transfers. The
serial clock on the SPI bus master supplies the clock signal (SCK) to time the transfer of
the bits. Four possible combinations of clock phase and polarity may be employed.
Data is transferred with the most significant bit first. The number of bits transferred per
command defaults to eight, but may be programmed to a value from 8–16 bits, using the
BITSE field.
Typically, outputs used for the SPI bus are not open drain unless multiple SPI masters are
in the system. If needed, WOMQ in S PCR0 may be set to provide open-drain outputs. An
external pullup resistor should be used on each output bus line. WOMQ affects all QSPI
pins regardless of whether they are assigned to the QSPI or used as general-purpose I/O.
9.5.5.1 MASTER MODE. When operated in master mode, the QSPI may initiate serial
transfers. The QSPI is unable to respond to any externally initiated serial transfers. QSPM
register QDDR should be written to direct the data flow on the QSPI pins used. The SCK
pin should be configured as an output. Pins MOSI, PCS1/SS, and PCS0 should be
configured as outputs as necessary. MISO should be configured as an input if necessary.
QSPM register QPAR should be written to assign the necessary bits to the QSPI. The pins
necessary for master mode operation are MISO and/or MOSI, SCK, and one or more of
the PCS pins, depending on the number of external peripheral chips to be selected. MISO
is used as the data input pin in master mode, and MOSI is used as the data output pin in
master mode. Either or both may be necessary, depending on the particular application.
SCK is the serial clock output in master mode.
PCS1/SS and PCS0 are the select pins used to select external SPI peripheral chips for a
serial transfer initiated by the QSPI. These pins operate as either active-high or active-low
chip selects. Other considerations for initialization are prescribed in 9.4.1 Overall QSPM
Configuration Summary.
9.5.5.1.1 Master Mode Operation. After reset, the QSPM registers and the QSPI control
registers must be initialized as described above. In addition to the command control
segment, the transmit data segment may, depending upon the application, need to be
initialized. If meaningful data is to be sent out from the QSPI, the user should write the
data to the transmit data segment before enabling the QSPI.
Shortly after SPE is set, the QSPI commences operation at the address indicated by
NEWQP. The QSPI transmits the data found in the transmit data segment at the address
indicated by NEWQP, and the QSPI stores received data in the receive data segment at
the address indicated by NEWQP. Data is transferred synchronously with the internally
generated SCK.
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.