9- 22
MC68341 USER’S MANUAL
MOTOROLA
Delay after transfer can be used to ensure that the deselect time requirement (for
peripherals having such a requirement) is met. Some peripherals must be deselected
for a minimum period of time between consecutive serial transfers. A delay after transfer
can be inserted between consecutive transfers to a given peripheral to ensure that its
minimum deselect time requirement is met or to allow serial A/D converters to complete
conversion before the next transfer is made.
9.5.4.3 QSPI CONTROL REGISTER 2 (SPCR2). SPCR2 contains parameters for
configuring the QSPI. Although the CPU can read and write this register, the QSPM has
read access only. Writes to this register are buffered. A write to SPCR2 that changes any
of the bit values (while the QSPI is operating) is ineffective on the current serial transfer,
but becomes effective on the next serial transfer. Reads of SPCR2 return the actual
current value of the register, not the buffer. Refer to 9.5.5 Operating Modes and
Flowcharts for a detailed description of this register.
SPCR2
$81C
15
14
13
12
11
10
9876543210
SPIFIE WREN WRTO
0
ENDQP
0000
NEWQP
RESE
T:
0000000000000000
SPIFIE—SPI Finished Interrupt Enable
1 = QSPI interrupts enabled
0 = QSPI interrupts disabled
SPIFIE enables the QSPI to generate a CPU interrupt upon assertion of the status flag
SFIP. Because of its special buffering, the value written to SPIFIE applies only upon
completion of the queue (the transfer of the entry indicated by ENDQP). Thus, if a single
sequence of queue entries is to be transferred (i.e., no WRAP), then SPIFIE should be
set to the desired state before the first transfer.
If a subqueue (see bit NEWQP) is to be used, the same CPU write that causes a branch
to the subqueue may enable or disable the SPIF interrupt for the subqueue. The
primary queue retains its own selected interrupt mode, either enabled or disabled.
The SPIF interrupt must be cleared by clearing SPIF. Later interrupts may then be
prevented by clearing SPIFIE to zero.
The QSPI has three possible interrupt sources, but only one interrupt vector. These
sources are SPIF, MODF, and HALTA. When the CPU responds to a QSPI interrupt,
the user must ascertain the exact interrupt cause by reading register SPSR. Any
interrupt that was set may then be cleared by writing to SPSR with a zero in the bit
position corresponding to the exact interrupt source. Clearing SPIFIE does not
immediately clear an interrupt already caused by SPIF.
WREN—Wrap Enable
1 = Wraparound mode enabled
0 = Wraparound mode disabled
WREN enables or disables wraparound mode. If enabled, the QSPI executes
commands in the queue through the command contained in ENDQP. Execution
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
..
.