
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
435 of 487
NXP Semiconductors
UM10800
Chapter 30: LPC82x ROM API ADC drivers
30.4.12 ADC ROM driver variables
30.4.12.1 ADC_CONFIG_T channel configuration structure
typedef struct {
uint32_t system_clock; // System clock
uint32_t adc_clock; // ADC clock (set system_clock >= adc_clock)
uint32_t async_mode;
uint32_t tenbit_mode;
uint32_t lpwr_mode;
uint32_t input_sel;
uint32_t seqa_ctrl;
uint32_t seqb_ctrl;
uint32_t thrsel;
uint32_t thr0_low;
uint32_t thr0_high;
uint32_t thr1_low;
uint32_t thr1_high;
uint32_t error_en;
uint32_t thcmp_en;
uint32_t channel_num;
} ADC_CONFIG_T;
The variables in this structure are defined as follows:
system_clock
: Frequency of the system clock generated by the SYSCON block in Hz.
adc_clock
: Frequency of the ADC clock in Hz. This is the clock rate for analog-to-digital
conversions. Maximum clock rate is 50 MHz for 12-bit resolution. In synchronous mode,
ensure that
system_clock
>=
adc_clock
.
async_mode
: 0 selects synchronous mode, 1 selects asynchronous mode. See
.
tenbit_mode
: 0 disables 10-bit mode, 1 enables fast-conversion, 10-bit mode. See
.
lpwr_mode
: 0 disables low-power mode, 1 enables low-power mode. See
.
inp_sel
: selects input for channel 0.
0x0 = ADCn_0 pin.
0x1 = Reserved.
0x2 = Reserved.
0x3 = Reserved.
0x4 =Reserved.
seqa_ctrl
: Register content of the SEQA_CTRL register. See
. Ensure that
the START and SEQA_EN bits are always set to 0.
seqb_ctrl
: Register content of the SEQB_CTRL register. See
. Ensure that
the START and SEQB_EN bits are always set to 0.
thrsel
: Register content of the CHAN_THRSEL register. See
thr0_low
: Low threshold 0 value.
thr0_high
: High threshold 0 value.