
UM10800
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2016. All rights reserved.
User manual
Rev. 1.2 — 5 October 2016
322 of 487
NXP Semiconductors
UM10800
Chapter 21: 12-bit Analog-to-Digital Converter (ADC)
•
For a sampling rate higher than 1 Msamples/s, VDDA must be higher than 2.7 V. See
•
Configure the ADC for the appropriate analog supply voltage using the TRM register
(
). The default setting assumes V
DDA
2.7 V.
21.3.1 Perform a single ADC conversion using a software trigger
Remark:
When A/D conversions are triggered by software only and hardware triggers are
not used in the conversion sequence, set the trigger source in the SEQA_CTRL and
SEQB_CTRL registers to 0x0 (default).
Once the sequence is enabled, the ADC converts a sample whenever the START bit is
written to. The TRIGPOL bit can be set in the same write that sets the SEQ_ENA and the
START bits. Be careful not to modify the TRIGGER, TRIGPOL, and SEQ_ENA bits on
subsequent writes to the START bit. See also
Section 21.7.2.1 “Avoiding spurious
.
The ADC converts an analog input signal VIN on the ADC_[11:0]. The VREFP and
VREFN pins provide a positive and negative reference voltage input. The result of the
conversion is (4095 x VIN)/(VREFP - VREFN). The result of an input voltage below
VREFN is 0, and the result of an input voltage above VREFP is 4095 (0xFFF).
To perform a single ADC conversion for ADC0 channel 1 using the analog signal on pin
ADC_1, follow these steps:
1. Enable the analog function ADC_1.
2. Configure the system clock to be 25 MHz and select a CLKDIV value of 0 for a
sampling rate of 1 Msamples/s using the ADC CTRL register.
3. Select ADC channel 1 to perform the conversion by setting the CHANNELS bits to
0x2 in the SEQA_CTL register.
4. Set the TRIGPOL bit to 1 and the SEQA_ENA bit to 1 in the SEQA_CTRL register.
5. Set the START bit to 1 in the SEQA_CTRL register.
6. Read the RESULT bits in the DAT1 register for the conversion result.
Fig 52. ADC clocking
CTRL register
Clock generation
ADC
SYSCON
ANALOG-to-
DIGITAL
CONVERSION
CLKDIV
system clock
SYSAHBCLKCTRL[24]