EasyManua.ls Logo

ST SPC560P34 - Figure 280. Normal Conversion Flow

ST SPC560P34
936 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) RM0046
578/936 Doc ID 16912 Rev 5
Normal conversion operating modes
Two operating modes are available for the normal conversion:
One Shot
Scan
To enter one of these modes, it is necessary to program the MCR[MODE] bit. The first
phase of the conversion process involves sampling the analog channel and the next phase
involves the conversion phase when the sampled analog value is converted to digital as
shown in Figure 280.
Figure 280. Normal conversion flow
In One Shot Mode (MODE = 0) a sequential conversion specified in the NCMR registers is
performed only once. At the end of each conversion, the digital result of the conversion is
stored in the corresponding data register.
Example 13One 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 the channel B followed by conversion of channels D-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 MCR[NSTART] bit 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 MSR[NSTART] status bit is automatically set when the Normal conversion starts. Unlike
One Shot Mode, the MCR[NSTART] bit 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 MSR[NSTART] bit.
Example 14Scan 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 the Scan Mode. MODE = 1 is set for Scan Mode. Conversion starts from
the 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 the channels D-E.
This sequence repeats itself till the MCR[NSTART] bit is cleared by software.
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 in the IMR register).
Sample B Convert B Sample C Sample D Convert D Sample E Convert EConvert C

Table of Contents

Related product manuals