MPC563XM Reference Manual, Rev. 1
Freescale Semiconductor
1099
Preliminary—Subject to Change Without Notice
Figure 24-92. Example of a CQueue Configuring the On-Chip ADCs/External Device
The initialization procedure described above does not generate ADC clocks that are in phase because the
timing at which the ADC0/1_EN bits, in the
Section 24.5.3.1, “ADC0/1 Control Registers (ADC0_CR and
, are set is different. Below follows an example on how to simultaneously set these bits so that
in-phase ADC clocks are generated. In this example, ADC0/1_CLK are configured to the same frequency.
1.
Push an ADC0_CR write configuration command in CFIFO0 that enables ADC0 (ADC0_EN=1)
and that sets the ADC0_CLK_PS to an appropriate value. For example, 0x80800801.
2.
Push an ADC1_CR write configuration command in CFIFO1 that enables ADC1 (ADC1_EN=1)
and that sets the ADC1_CLK_PS to an appropriate value. For example, 0x82800801.
3.
Configure CFIFO0 and CFIFO1 to single scan software trigger mode and simultaneously trigger
them by writing 0x04100410 to the EQADC_CFCR0 register - see
CFIFO Control Registers (EQADC_CFCR)
24.7.1.2
Configuring EQADC for Applications
This section provides an example based on the applications in
. The example describes how to
configure multiple CQueues to be used for those applications and provides a step-by-step procedure to
configure the EQADC and the associated CQueue structures. In the example, the “Fast hardware-triggered
CQueue”, described on the second row of
, will have its commands transferred to CBuffer1;
the conversion commands will be executed by ADC1. The generated results will be returned to RFIFO3
before being transferred to the RQueues in the RAM by the DMAC.
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 24.6.2.3, “Message Format in EQADC
for details.
Step One: Setup the CQueues and RQueues.
1.
Load the RAM with configuration and conversion commands.
is an example of how
CQueue1 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.
Configuration Command to CBuffer0 - Ex: Write ADC0_CR
CQueue in
0x0
0x1
0x2
0x3
system memory
Configuration Command to CBuffer2 - Ex: Write to external device configuration register
Configuration Command to CBuffer0 - Ex: Write ADC_TSCR
Configuration Command to CBuffer1 - Ex: Write ADC1_CR
Command
Address