Motorola ColdFire MCF5281 User Manual page 640

Motorola microcontroller user's manual
Table of Contents

Advertisement

Digital Control Subsystem
27.8.7.2 Externally Triggered Continuous-Scan Mode
The QADC provides external trigger signals for both queues. When externally triggered
continuous-scan mode is selected, a transition on the associated external trigger signal
initiates queue execution. The polarity of the external trigger signal is programmable, so
that a mode which begins queue execution on the rising or falling edge can be selected.
Each CCW is read and the indicated conversions are performed until an end-of-queue
condition is encountered. When the next external trigger edge is detected, queue execution
begins again automatically. Software involvement is not needed between trigger events.
When a pause bit is encountered in externally triggered continuous-scan mode, another
trigger event is required for queue execution to continue. Software involvement is not
needed for queue execution to continue from the paused state.
Some applications need to synchronize the sampling of analog channels to external events.
There are cases when it is not possible to use software initiation of the queue scan sequence,
because interrupt response times vary. Externally triggered continuous-scan mode is useful
in these cases.
27.8.7.3 Externally Gated Continuous-Scan Mode
The QADC provides external gating for queue 1 only. When externally gated
continuous-scan mode is selected, the input level on the associated external trigger signal
enables and disables queue execution. The polarity of the external gate signal is fixed so
that a high level opens the gate and a low level closes the gate. Once the gate is open, each
CCW is read and the indicated conversions are performed until the gate is closed. When the
gate opens again, queue execution automatically restarts at the beginning of the queue.
Software involvement is not needed between trigger events. If a pause in a CCW is
encountered, the pause flag does not set, and execution continues without pausing.
The purpose of externally gated continuous-scan mode is to continuously collect digitized
samples while the gate is open and to have the most recent samples available. It is up to the
programmer to ensure that the gate is not opened so long that an end-of-queue is reached.
In the event that the queue completes before the gate closes, the CF1 flag will set, and the
queue will roll over to the beginning and continue conversions until the gate closes. If the
gate remains open and the CF1 flag is not cleared, when the queue completes a second time
the TOR1 flag will set and the queue will roll-over again. The queue will continue to
execute until the gate closes or the mode is disabled.
If the gate closes before queue 1 completes execution, the QADC stops and sets the PF1 bit
to indicate an incomplete queue. The CWPQ1 field can be read to determine the last valid
conversion in the queue. If the gate opens again, execution of queue 1 restarts. The start of
queue 1 is always the first CCW in the CCW table. The condition of the gate is only
sampled after each conversion during queue execution, so closing the gate for a period less
than a conversion time interval does not guarantee the closure will be captured.
27-56
MCF5282 User's Manual
MOTOROLA

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfire mcf5282

Table of Contents