
MOTOROLA
MC68341 USER’S MANUAL
9- 25
designated by the last command before the halt. If CONT was clear, the QSPI drives
the peripheral chip-select pins to the value in QSPM register QPDR.
If HALT is asserted during the last command in the queue, the QSPI completes the last
command, asserts both HALTA and SPIF, and clears SPE. If the last queue command
has not been executed, asserting HALT does not set SPIF nor clear SPE. QSPI
execution continues when the CPU clears HALT.
9.5.4.5 QSPI STATUS REGISTER (SPSR). SPSR contains QSPI status information. Only
the QSPI can assert the bits in this register. The CPU reads this register to obtain status
information and writes this register to clear status flags. CPU writes to CPTQP have no
effect.
SPSR
$81F
15
76543210
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
SPIF
MODF HALTA
0
CPTQP
RESET:
00000000
SPIF—QSPI Finished Flag
1 = QSPI finished
0 = QSPI not finished
SPIF is set when the QSPI finishes executing the last command determined by the
address contained in ENDQP in SPCR2. When the address of the command being
executed matches the ENDQP, the SPIF flag is set after finishing the serial transfer.
If wraparound mode is enabled (WREN = 1), the SPIF is set, after completion of the
command defined by ENDQP, each time the QSPI cycles through the queue. If SPIFIE
in SPCR2 is set, an interrupt is generated when SPIF is asserted. Once SPIF is set, the
CPU may clear it by reading SPSR followed by writing SPSR with a zero in SPIF.
MODF—Mode Fault Flag
1 = Another SPI node requested to become the network SPI master while the QSPI
was enabled in master mode (MSTR = 1), or the PCS0/SS pin was incorrectly
pulled low by external hardware.
0 = Normal operation
MODF is asserted by the QSPI when the QSPI is the serial master (MSTR = 1) and the
slave select (PCS0/SS ) input pin is pulled low by an external driver. This is possible
only if the PCS0/SS pin is configured as input by QDDR. This low input to SS is not a
normal operating condition. It indicates that a multimaster system conflict may exist, that
an external device is requesting to become the SPI network master, or simply that the
hardware is incorrectly affecting PCS0/SS. SPE in SPCR1 is cleared, disabling the
QSPI. The QSPI pins revert to control by QPDR. If MODF is set and HMIE in SPCR3 is
asserted, the QSPI generates an interrupt to the CPU.
The CPU may clear MODF by reading SPSR with MODF asserted, followed by writing
SPSR with a zero in MODF. After correcting the mode fault problem, the QSPI can be
re-enabled by asserting SPE.
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
..
.