MOTOROLA
Chapter 13. QADC64E Legacy Mode Operation
13-19
Programming the QADC64E Registers
Table 13-12. QACR2 Bit Descriptions
Bits
Name
Description
0
CIE2
Queue 2 Completion Software Interrupt Enable. CIE2 enables an interrupt upon completion of
queue 2. The interrupt request is initiated when the conversion is complete for the CCW in
queue 2.
0 Disable the queue completion interrupt associated with queue 2
1 Enable an interrupt after the conversion of the sample requested by the last CCW in queue 2
1
PIE2
Queue 2 Pause Software Interrupt Enable. PIE2 enables an interrupt when queue 2 enters the
pause state. The interrupt request is initiated when conversion is complete for a CCW that has
the pause bit set.
0 Disable the pause interrupt associated with queue 2
1 Enable an interrupt after the conversion of the sample requested by a CCW in queue 2 which
has the pause bit set
2
SSE2
Queue 2 Single-Scan Enable Bit. SSE2 enables a single-scan of queue 2 to start after a trigger
event occurs. The SSE2 bit may be set to a one during the same write cycle when the MQ2 bits
are set for one of the single-scan queue operating modes. The single-scan enable bit can be
written as a one or a zero, but is always read as a zero. The SSE2 bit enables a trigger event
to initiate queue execution for any single-scan operation on queue 2. The QADC64E clears the
SSE2 bit when the single-scan is complete. Refer to
Table 13-13 for more information.
0 Trigger events are not accepted for single-scan modes
1 Accept a trigger event to start queue 2 in a single-scan mode
3:7
MQ2
Queue 2 Operating Mode. The MQ2 field selects the queue operating mode for queue 2. Refer
8
RESUME
0 After suspension, begin executing with the first CCW in queue 2 or the current sub-queue
1 After suspension, begin executing with the aborted CCW in queue 2
9:15
BQ2
Beginning of queue 2. The BQ2 field indicates the CCW location where queue 2 begins. To allow
the length of queue 1 and queue 2 to vary, a programmable pointer identifies the CCW table
location where queue 2 begins. The BQ2 field also serves as an end-of-queue condition for
queue 1. Setting BQ2 beyond physical CCW table memory space allows queue 1 all 64 entries.
Software defines the beginning of queue 2 by programming the BQ2 field in QACR2. BQ2 is
usually programmed before or at the same time as the queue operating mode for queue 2 is
selected. If BQ2 is 64 or greater, queue 2 has no entries, and the entire CCW table is dedicated
to queue 1 and CCW63 is the end-of-queue 1. If BQ2 is zero, the entire CCW table is dedicated
to queue 2. As a special case, when a queue operating mode for queue 1 is selected and a
trigger event occurs for queue 1 with BQ2 set to zero, queue 1 execution is terminated after
CCW0 is read. Conversions do not occur.
The BQ2 pointer may be changed dynamically, to alternate between queue 2 scan sequences.
A change in BQ2 after queue 2 has begun or if queue 2 has a trigger pending does not affect
queue 2 until queue 2 is started again.For example, two scan sequences could be defined as
follows: the first sequence starts at CCW10, with a pause after CCW11 and an EOQ
programmed in CCW15; the second sequence starts at CCW16, with a pause after CCW17 and
an EOQ programmed in CCW39.
With BQ2 set to CCW10 and the continuous-scan mode selected, queue execution begins.
When the pause is encountered in CCW11, a software interrupt routine can redefine BQ2 to be
CCW16. Therefore, after the end-of-queue is recognized in CCW15, an internal retrigger event
is generated and execution restarts at CCW16. When the pause software interrupt occurs
again, software can change BQ2 back to CCW10. After the end-of-queue is recognized in
CCW39, an internal retrigger event is created and execution now restarts at CCW10.
If BQ2 is changed while queue 1 is active, the effect of BQ2 as an end-of-queue indication for
queue 1 is immediate. However, beware of the risk of losing the end-of-queue 1 through moving
BQ2. Recommend use of EOQ (chan63) to end queue 1.
Note: Be sure to do a mode change when changing BQ2 and setting SSE2. Setting BQ2 first
is recommended.