EasyManua.ls Logo

NXP Semiconductors MPC5606S - Injected Channel Conversion

NXP Semiconductors MPC5606S
1344 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Analog-to-Digital Converter (ADC)
MPC5606S Microcontroller Reference Manual, Rev. 7
Freescale Semiconductor 133
Example 5-1. One Shot mode (MODE = 0)
Channels A-B-C-D-E-F-G-H are present in the device where channels B-D-E are to be converted
in the One Shot mode. MODE = 0 is set for One Shot mode. Conversion starts from channel B
followed by conversion of channels D and E. At the end of conversion of channel E the scanning
of channels stops.
The NSTART status bit in the MSR is automatically set when the normal conversion starts. At the same
time the NSTART bit in the MCR is reset, allowing the software to program a new start of conversion. In
that case the new requested conversion starts after the running conversion is completed.
In Scan mode (MODE = 1), a sequential conversion of N channels specified in the NCMR registers is
continuously performed. As in the previous case, at the end of each conversion the digital result of the
conversion is stored into the corresponding data register.
The NSTART status bit in the MSR is automatically set when the normal conversion starts. Unlike One
Shot mode, the NSTART bit in the MCR is not reset. It can be reset by software when the user needs to
stop scan mode. In that case, the ADC completes the current scan conversion and, after the last conversion,
also resets the NSTART bit in the MSR.
Example 5-2. Scan mode (MODE = 1)
Channels A-B-C-D-E-F-G-H are present in the device where channels B-D-E are to be converted
in Scan mode. MODE = 1 is set for Scan mode. Conversion starts from channel B followed by
conversion of the channels D-E. At the end of conversion of channel E the scanning of channel B
starts followed by conversion of channels D and E. This sequence repeats itself till the NSTART
bit in the MCR is reset by software.
If the conversion is started by an external trigger and EDGLEV is 0, the NSTART bit in the MCR is not
set. As a consequence, the only way to stop scan mode conversion once it has started is to set the MODE
bit to 0.
At the end of each conversion an End Of Conversion interrupt is issued (if enabled by the corresponding
mask bit) and at the end of the conversion sequence an End Of Chain interrupt is issued (if enabled by the
corresponding mask bit).
5.3.1.4 Injected channel conversion
A conversion chain can be injected into the ongoing normal conversion by configuring the Injected
Conversion Mask Registers (JCMR). As normal conversion, each channel can be individually selected.
This injected conversion can only occur in One Shot mode and interrupts the normal conversion. When an
injected conversion is inserted, ongoing channel conversion is aborted and the injected channel request is
processed. After the last channel in the injected chain is converted, normal conversion resumes from the
channel at which the normal conversion was stopped, as shown in Figure 5-3.

Table of Contents

Related product manuals