Enhanced Queued Analog-to-Digital Converter (eQADC)
MPC5510 Microcontroller Family Reference Manual, Rev. 1
Freescale Semiconductor
31-75
Preliminary
c) Set EOQIE0 to enable the eQADC to generate an interrupt after transferring all of the
commands of Queue0 through CFIFO0.
5. Configure
Section 31.3.3.6, “eQADC CFIFO Control Registers 0–5 (EQADC_CFCRn)
a) Write 0b0001 to the MODE0 field in eQADC_CFCR0 to program CFIFO0 for software
single-scan mode.
b) Write 1 to SSE0 to assert SSS0 and trigger CFIFO0.
6. Because CFIFO0 is in single-scan software mode and it is also the highest priority CFIFO, the
eQADC starts to transfer configuration commands to the on-chip ADC.
7. When all of the configuration commands have been transferred, EQADC_FISR
n
[CF0] (see
Section 31.3.3.8, “eQADC FIFO and Interrupt Status Registers 0–5 (EQADC_FISRn)
set. The eQADC generates an end-of-queue interrupt. The initialization procedure is complete.
Figure 31-46. Example of a Command Queue Configuring the On-Chip ADC
31.5.1.2
Configuring eQADC for Applications
This section provides an example based on the applications in
. The example describes how to
configure multiple command queues to be used for those applications and provides a step-by-step
procedure to configure the eQADC and the associated command queue structures. In the example, the
“Fast hardware-triggered command queue,” described on the second row of
, will have its
commands transferred to ADC; the conversion commands will be executed by ADC. The generated results
will be returned to RFIFO3 before being transferred to the result queues in the RAM by the eDMA.
NOTE
There is no fixed relationship between CFIFOs and RFIFOs with the same
number. The results of commands being transferred through CFIFO1 can be
returned to any RFIFO, regardless of its number. The destination of a result
is determined by the MESSAGE_TAG field of the command that requested
the result. See
Section 31.4.1.1, “Message Format in eQADC
,” for details.
Step One: Set up the command queues and result queues.
1. Load the RAM with configuration and conversion commands.
is an example of how
command queue 1 commands should be set.
a) Each trigger event will cause four commands to be executed. When the eQADC detects the
pause bit asserted, it will wait for another trigger to restart transferring commands from the
CFIFO.
b) At the end of the command queue, the “EOQ” bit is asserted as shown in
c) Results will be returned to RFIFO3 as specified in the MESSAGE_TAG field of commands.
2. Reserve memory space for storing results.
Configuration Command to ADC0—Ex: Write ADC0_CR
Command Queue in
0x0
0x1
System Memory
Configuration Command to ADC0—Ex: Write ADC_TSCR
Command
Address