
9- 40
MC68341 USER’S MANUAL
MOTOROLA
address, increments NEWQP, and continues storing the remaining bits (up to the BITS
value) in the next receive data segment address.
As long as PCS0/SS remains low, the QSPI continues to store the incoming bit stream in
sequential receive data segment addresses, until either the value in BITS is reached or
the end-of-queue address is used with wraparound mode disabled. When the end of the
queue is reached, the SPIF flag is asserted, optionally causing an interrupt. If wraparound
mode is disabled, any additional incoming bits are ignored. If wraparound mode is
enabled, storing continues at either address $0 or the address of NEWQP, depending on
the WRTO value.
When using this capability to receive a long incoming data stream, the proper delay
between transfers must be used. The QSPI requires time, approximately 1
s at 16.78-
MHz system clock, to prefetch the next transmit RAM entry for the next transfer.
Therefore, the user may select a baud rate that provides at least a 1
s delay between
successive transfers to ensure no loss of incoming data. If the system clock is operating at
a slower rate, the delay between transfers must be increased proportionately.
Because the BITSE option in the command control segment is no longer available, BITS
sets the number of bits to be transferred for all transfers in the queue until the CPU
changes the BITS value. As mentioned above, until PCS0/SS is negated (brought high),
the QSPI continues to shift one bit for each pulse of SCK. If PCS0/SS is negated before
the proper number of bits (according to BITS) is received, the QSPI, the next time it is
selected, resumes storing bits in the same receive data segment address where it left off.
If more than 16 bits are transferred before negating the PCS0/SS, the QSPI stores the
number of bits indicated by BITS in the current receive data segment address, then
increments the address and continues storing as described above. Note that PCS0/ SS
does not necessarily have to be negated between transfers.
Once the proper number of bits (designated by BITS) are transferred, the QSPI stores the
received data in the receive data segment, stores the internal working queue pointer value
in CPTQP, increments the internal working queue pointer, and loads the new transmit
data from the transmit data segment into the data serializer. The internal working queue
pointer address is used the next time PCS0/SS is asserted, unless the CPU writes to the
NEWQP first.
The DT and DSCK command control bits are not used in slave mode. As a slave, the
QSPI does not drive the clock line nor the chip-select lines and, therefore, does not
generate a delay.
In slave mode, the QSPI shifts out the data in the transmit data segment. The transmit
data is loaded into the data serializer (refer to Figure 9-9) for transmission. This serializer
shifts the 16 bits of data out in sequence, most significant bit first, as clocked by the
incoming SCK signal. The QSPI uses CPHA and CPOL to determine which incoming SCK
edge the MOSI pin uses to latch incoming data, and which edge the MISO pin uses to
drive the data out.
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
..
.