English
Language : 

MC9S12P128 Datasheet, PDF (311/564 Pages) Freescale Semiconductor, Inc – S12 Microcontrollers
Analog-to-Digital Converter (ADC12B10CRev 00.05) Block Description
9.3.2.3 ATD Control Register 2 (ATDCTL2)
Writes to this register will abort current conversion sequence.
Module Base + 0x0002
7
R
0
W
6
AFFC
5
ICLKSTP
4
ETRIGLE
3
ETRIGP
2
ETRIGE
Reset
0
0
0
0
0
0
= Unimplemented or Reserved
Figure 9-5. ATD Control Register 2 (ATDCTL2)
Read: Anytime
Write: Anytime
Table 9-6. ATDCTL2 Field Descriptions
1
ASCIE
0
0
ACMPIE
0
Field
Description
6
AFFC
5
ICLKSTP
4
ETRIGLE
3
ETRIGP
2
ETRIGE
ATD Fast Flag Clear All
0 ATD flag clearing done by write 1 to respective CCF[n] flag.
1 Changes all ATD conversion complete flags to a fast clear sequence.
For compare disabled (CMPE[n]=0) a read access to the result register will cause the associated CCF[n] flag
to clear automatically.
For compare enabled (CMPE[n]=1) a write access to the result register will cause the associated CCF[n] flag
to clear automatically.
Internal Clock in Stop Mode Bit — This bit enables A/D conversions in stop mode. When going into stop mode
and ICLKSTP=1 the ATD conversion clock is automatically switched to the internally generated clock ICLK.
Current conversion sequence will seamless continue. Conversion speed will change from prescaled bus
frequency to the ICLK frequency (see ATD Electrical Characteristics in device description). The prescaler bits
PRS4-0 in ATDCTL4 have no effect on the ICLK frequency. For conversions during stop mode the automatic
compare interrupt or the sequence complete interrupt can be used to inform software handler about changing
A/D values. External trigger will not work while converting in stop mode. For conversions during transition from
Run to Stop Mode or vice versa the result is not written to the results register, no CCF flag is set and no compare
is done. When converting in Stop Mode (ICLKSTP=1) an ATD Stop Recovery time tATDSTPRCV is required to
switch back to bus clock based ATDCLK when leaving Stop Mode. Do not access ATD registers during this time.
0 If A/D conversion sequence is ongoing when going into stop mode, the actual conversion sequence will be
aborted and automatically restarted when exiting stop mode.
1 A/D continues to convert in stop mode using internally generated clock (ICLK)
External Trigger Level/Edge Control — This bit controls the sensitivity of the external trigger signal. See
Table 9-7 for details.
External Trigger Polarity — This bit controls the polarity of the external trigger signal. See Table 9-7 for details.
External Trigger Mode Enable — This bit enables the external trigger on one of the AD channels or one of the
ETRIG3-0 inputs as described in Table 9-5. If external trigger source is one of the AD channels, the digital input
buffer of this channel is enabled. The external trigger allows to synchronize the start of conversion with external
events. External trigger will not work while converting in stop mode.
0 Disable external trigger
1 Enable external trigger
S12P-Family Reference Manual, Rev. 1.12
Freescale Semiconductor
311