MC68336/376
QUEUED SERIAL MODULE
MOTOROLA
USER’S MANUAL
Rev. 15 Oct 2000
9-7
A dedicated 80-byte RAM is used to store received data, data to be transmitted, and
a queue of commands. The CPU32 can access these locations directly. This allows
serial peripherals to be treated like memory-mapped parallel devices.
The command queue allows the QSPI to perform up to 16 serial transfers without
CPU32 intervention. Each queue entry contains all the information needed by the
QSPI to independently complete one serial transfer.
A pointer identifies the queue location containing the data and command for the next
serial transfer. Normally, the pointer address is incremented after each serial transfer,
but the CPU32 can change the pointer value at any time. Support of multiple-tasks can
be provided by segmenting the queue.
The QSPI has four peripheral chip-select pins. The chip-select signals simplify inter-
facing by reducing CPU32 intervention. If the chip-select signals are externally
decoded, 16 independent select signals can be generated.
Wrap-around mode allows continuous execution of queued commands. In wrap-
around mode, newly received data replaces previously received data in the receive
RAM. Wrap-around mode can simplify the interface with A/D converters by continu-
ously updating conversion values stored in the RAM.
Continuous transfer mode allows transfer of an uninterrupted bit stream. Any number
of bits in a range from 8 to 256 can be transferred without CPU32 intervention. Longer
transfers are possible, but minimal intervention is required to prevent loss of data. A
standard delay of 17 system clocks is inserted between the transfer of each queue
entry.
9.3.1 QSPI Registers
The programmer’s model for the QSPI consists of the QSM global and pin control reg-
isters, four QSPI control registers (SPCR[0:3]), the status register (SPSR), and the 80-
byte QSPI RAM. Registers and RAM can be read and written by the CPU32. Refer to
9.3.1.1 Control Registers
Control registers contain parameters for configuring the QSPI and enabling various
modes of operation. The CPU32 has read and write access to all control registers. The
QSM has read access only to all bits except the SPE bit in SPCR1. Control registers
must be initialized before the QSPI is enabled to insure defined operation. SPCR1
must be written last because it contains the QSPI enable bit (SPE).
Writing a new value to any control register except SPCR2 while the QSPI is enabled
disrupts operation. SPCR2 is buffered. New SPCR2 values become effective after
completion of the current serial transfer. Rewriting NEWQP in SPCR2 causes execu-
tion to restart at the designated location. Reads of SPCR2 return the current value of
the register, not of the buffer. Writing the same value into any control register except
SPCR2 while the QSPI is enabled has no effect on QSPI operation.