
MOTOROLA
7-26
DIGITAL CONTROL
QADC
REFERENCE MANUAL
retains the status it held prior to freezing. As a result, the queue status can show queue
1 active, queue 2 idle, even though neither queue is being executed during freeze.
CWP — Command Word Pointer
The CWP allows the software to know which CCW is executing at present, or was last
completed. The command word pointer is a software read-only field, and write opera-
tions have no effect. The CWP allows software to monitor the progress of the QADC
scan sequence. The CWP field is a CCW word pointer with a valid range of 0 to 39.
When a queue enters the paused state, the CWP points to the CCW with the pause
bit set. While in pause, the CWP value is maintained until a trigger event occurs on the
same queue or the other queue. Usually, the CWP is updated a few clock cycles be-
fore the queue status field shows that the queue has become active. For example,
software may read a CWP pointing to a CCW in queue 2, and the status field shows
queue 1 paused, queue 2 trigger pending.
When the QADC finishes the scan of the queue, the CWP points to the CCW where
the end-of-queue condition was detected. Therefore, when the end-of-queue condition
is a CCW with the EOQ code (channel 63), the CWP points to the CCW containing the
EOQ.
When the last CCW in a queue is in the last CCW table location (CCW39), and it does
not contain the EOQ code, the end-of-queue is detected when the following CCW is
read, so the CWP points to word 40.
Finally, when queue 1 operation is terminated after a CCW is read that is defined as
BQ2, the CWP points to the same CCW as BQ2.
Since the CWP is six bits, the value could range from 0 to 63. However, since there
are 40 locations in the CCW table, the normal range of CWP is 0 to 39. The CWP
shows 40 when queue execution terminates with the physical end of the CCW table.
The CWP would also show a value between 40 and 63 if BQ2 were set in that range
and queue 2 execution were initiated.
During the stop mode, the CWP is reset to zero, since the control registers and the
analog logic are reset. When the freeze mode is entered, the CWP is unchanged; it
points to the last executed CCW.
7.7 Conversion Command Word Table
The CCW table is a RAM, 40 words long and 10 bits wide, which can be programmed
by the software to request conversions of one or more analog input channels. The en-
tries in the CCW table are 10-bit conversion command words. The CCW table is writ-
ten by software and is not modified by the QADC. Each CCW requests the conversion
of an analog channel to a digital result. The CCW specifies the analog channel num-
ber, the input sample time, and whether the queue is to pause after the current CCW.
The ten implemented bits of the CCW word are read/write data, but they may be writ-
ten once when the software initializes the QADC, and not changed afterwards. Unim-
plemented bits are read as zeros, and write operations have no effect. Each location
in the CCW table corresponds to a location in the result word table. When a conversion
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.