English
Language : 

MC68HC16Z1CAG16 Datasheet, PDF (218/500 Pages) Freescale Semiconductor, Inc – M68HC16Z Series users manual
Freescale Semiconductor, Inc.
9.3.2.3 Command RAM
Command RAM is used by the QSPI in master mode. The CPU16 writes one byte of
control information to this segment for each QSPI command to be executed. The QSPI
cannot modify information in command RAM.
Command RAM consists of 16 bytes. Each byte is divided into two fields. The periph-
eral chip-select field enables peripherals for transfer. The command control field pro-
vides transfer options.
A maximum of 16 commands can be in the queue. Queue execution by the QSPI pro-
ceeds from the address in NEWQP through the address in ENDQP (both of these
fields are in SPCR2).
9.3.3 QSPI Pins
The QSPI uses seven pins. These pins can be configured for general-purpose I/O
when not needed for QSPI application.
Table 9-2 shows QSPI input and output pins and their functions.
Table 9-2 QSPI Pins
Pin Names
Master In Slave Out
Master Out Slave In
Serial Clock
Peripheral Chip Selects
Slave Select
Mnemonics
MISO
MOSI
SCK
PCS[3:1]
PCS0/SS
Mode
Master
Slave
Master
Slave
Master
Slave
Master
Master
Master
Slave
Function
Serial data input to QSPI
Serial data output from QSPI
Serial data output from QSPI
Serial data input to QSPI
Clock output from QSPI
Clock input to QSPI
Select peripherals
Selects peripherals
Causes mode fault
Initiates serial transfer
9.3.4 QSPI Operation
The QSPI uses a dedicated 80-byte block of static RAM accessible by both the QSPI
and the CPU16 to perform queued operations. The RAM is divided into three seg-
ments. There are 16 command bytes, 16 transmit data words, and 16 receive data
words. QSPI RAM is organized so that one byte of command data, one word of trans-
mit data, and one word of receive data correspond to one queue entry, $0–$F.
The CPU16 initiates QSPI operation by setting up a queue of QSPI commands in com-
mand RAM, writing transmit data into transmit RAM, then enabling the QSPI. The
QSPI executes the queued commands, sets a completion flag (SPIF), and then either
interrupts the CPU16 or waits for intervention.
There are four queue pointers. The CPU16 can access three of them through fields in
QSPI registers. The new queue pointer (NEWQP), contained in SPCR2, points to the
first command in the queue. An internal queue pointer points to the command currently
being executed. The completed queue pointer (CPTQP), contained in SPSR, points to
the last command executed. The end queue pointer (ENDQP), contained in SPCR2,
points to the final command in the queue.
QUEUED SERIAL MODULE
M68HC16 Z SERIES
9-8
For More Information On This Product,
USER’S MANUAL
Go to: www.freescale.com