If the compare and hardware averaging functions are disabled, a conversion complete
event sets SC1n[COCO] and generates an ADC interrupt to wake the MCU from Normal
Stop mode if the respective ADC interrupt is enabled, that is, when SC1n[AIEN]=1. The
result register, Rn, will contain the data from the first completed conversion that occurred
during Normal Stop mode. If the hardware averaging function is enabled, SC1n[COCO]
will set, and generate an interrupt if enabled, when the selected number of conversions
are completed. If the compare function is enabled, SC1n[COCO] will set, and generate an
interrupt if enabled, only if the compare conditions are met. If a single conversion is
selected and the compare is not true, the ADC will return to its Idle state and cannot wake
the MCU from Normal Stop mode unless a new conversion is initiated by another
hardware trigger.
28.4.11 MCU Low-Power Stop mode operation
The ADC module is automatically disabled when the MCU enters Low-Power Stop
mode. All module registers contain their reset values following exit from Low-Power
Stop mode. Therefore, the module must be re-enabled and re-configured following exit
from Low-Power Stop mode.
NOTE
For the chip specific modes of operation, see the power
management information for the device.
28.5 Initialization information
This section gives an example that provides some basic direction on how to initialize and
configure the ADC module. The user can configure the module for 16-bit, 12-bit, 10-bit,
or 8-bit single-ended resolution or 16-bit, 13-bit, 11-bit, or 9-bit differential resolution,
single or continuous conversion, and a polled or interrupt approach, among many other
options. For information used in this example, refer to Table 28-73, Table 28-74, and
Table 28-75.
Note
Hexadecimal values are designated by a preceding 0x, binary
values designated by a preceding %, and decimal values have
no preceding character.
28.5.1 ADC module initialization example
Chapter 28 Analog-to-Digital Converter (ADC)
KL25 Sub-Family Reference Manual, Rev. 3, September 2012
Freescale Semiconductor, Inc. 499