SAADC — Successive approximation analog-to-digital converter

The SAADC peripheral is a differential successive approximation register (SAR) analog-to-digital converter.

The main features of SAADC are the following:

Shared resources

The ADC can coexist with COMP and other peripherals using one of AIN0-AIN7 , provided these are assigned to different pins.

It is not recommended to select the same analog input pin for both modules.

Overview

The ADC supports up to eight external analog inputs. It can be operated in One-shot mode with sampling under software control, or Continuous mode with a programmable sampling rate.

The analog inputs can be configured as eight single-ended inputs, four differential inputs or a combination of these. Each channel can be configured to select:
  • GPIO pins with analog input function, see Pin assignments, also marked with name AIN. Input range is 0 to VDD.
  • VDD (divided down to a valid range using the programmable gain stage)
  • DVDD
  • AVDD
Channels can be sampled individually in one-shot or continuous sampling modes, or, using scan mode, multiple channels can be sampled in sequence. To improve noise performance, channels can be oversampled.

Oversampling can be done with either noise shaping or by accumulation and averaging.

Figure 1. Simplified ADC block diagram

Simplified ADC block diagram

Internally, the ADC is always a differential analog-to-digital converter, but by default it is configured with single-ended input in the MODE field of the CH[n].CONFIG register. In single-ended mode, the negative input will be shorted to ground internally.

The assumption in single-ended mode is that the internal ground of the ADC is the same as the external ground that the measured voltage is referred to. The ADC is thus sensitive to ground bounce on the PCB in single-ended mode. If this is a concern we recommend using differential measurement.

Digital output

The output result of the ADC depends on the settings in the CH[n].CONFIG and RESOLUTION registers as follows:

RESULT = [V(P) – V(N) ] * GAIN/REFERENCE * 2(RESOLUTION - m)

where

V(P)
is the voltage at input P
V(N)
is the voltage at input N
GAIN
is the selected gain setting
m
is the mode setting. Use m=0 if CONFIG.MODE=SE, or m=1 if CONFIG.MODE=Diff
REFERENCE
is the selected reference voltage

The result generated by the ADC will deviate from the expected due to DC errors like offset, gain, differential non-linearity (DNL), and integral non-linearity (INL). See Electrical specification for details on these parameters. The result can also vary due to AC errors like non-linearities in the GAIN block, settling errors due to high source impedance and sampling jitter. For battery measurement, the DC errors are most noticeable.

The ADC has a wide selection of gains controlled in the GAIN field of the CH[n].CONFIG register. If CH[n].CONFIG.REFSEL=0, the input range of the ADC core is nominally ±0.9 V differentially, and the input must be scaled accordingly with proper gain setting.

The ADC has a temperature dependent offset. If the ADC is to operate over a large temperature range, we recommend running CALIBRATEOFFSET at regular intervals. The CALIBRATEDONE event will be generated when the calibration has been completed. Note that the DONE and RESULTDONE events will also be generated.

Analog inputs and channels

Up to eight analog input channels, CH[n](n=0..7), can be configured.

See Shared resources for shared input with comparators.

Any one of the available channels can be enabled for the ADC to operate in one-shot mode. If more than one CH[n] is configured, the ADC enters scan mode.

An analog input is selected as a positive converter input if CH[n].PSELP is set, setting CH[n].PSELP also enables the particular channel.

An analog input is selected as a negative converter input if CH[n].PSELN is set. The CH[n].PSELN register will have no effect unless differential mode is enabled and CH[n].PSELP is set, see MODE field in CH[n].CONFIG register.

Important: It is not recommended to use the same analog input pin for multiple analog peripheral functions. See also Shared resources.

Operation modes

The ADC input configuration supports several modes of sampling.

Note: Scan mode and oversampling should not be combined without burst.
  1. The ADC must be enabled and started via the ENABLE register and START task.
  2. At least one channel must be enabled (via the CH[n].CONFIG registers).
  3. Now the ADC can be sampled, by triggering the SAMPLE task.

The ADC indicates a single ongoing conversion via the register STATUS. During scan mode, oversampling, noise shaping, or continuous modes, more than a single conversion takes place in the ADC. As consequence, the value reflected in STATUS register will toggle at the end of each single conversion.

One-shot mode

One-shot operation is configured by enabling only one of the available channels defined by CH[n].PSELP, CH[n].PSELN, and CH[n].CONFIG registers.

Upon a SAMPLE task, the ADC powers up and starts to sample the input voltage. The CH[n].CONFIG.TACQ controls the acquisition time.

The time it takes to perform the first sample is tPWRUP + tACQ + tCONV, where tACQ is the acquisition time, tCONV is the conversion time, and tPWRUP is the time it takes to power up the ADC.

If multiple samples are taken, some combinations of tACQ and tCONV will allow SAADC to pipeline sampling and conversion, at which point the actual sampling time is just tCONV.

A DONE event signals that one sample has been taken.

In this mode, the RESULTDONE event has the same meaning as DONE when no oversampling takes place. Note that both events may occur before the actual value has been transferred into RAM by EasyDMA. For more information, see EasyDMA.

Continuous mode

Continuous sampling can be achieved by using the internal timer in the ADC, or triggering the SAMPLE task from one of the general purpose timers through the PPI system.

Care shall be taken to ensure that the sample rate fulfils the following criteria, depending on how many channels are active:
tSAMPLE > tACQ + tCONV
If tACQ=0 and tCONV=0, SAADC will use pipelining to increase sampling speed. In this case, the time for the first sample to arrive is
tSAMPLE = tPWRUP + tACQ + tCONV
and for subsequent samples
fSAMPLE = 1/(tCONV)

The SAMPLERATE register can be used as a local timer instead of triggering individual SAMPLE tasks. When SAMPLERATE.MODE is set to Timers, it is sufficient to trigger SAMPLE task only once in order to start the SAADC and triggering the STOP task will stop sampling. The SAMPLERATE.CC field controls the sample rate.

A DONE event signals that one sample has been taken.

In this mode, the RESULTDONE event has the same meaning as DONE when no oversampling takes place. Note that both events may occur before the actual value has been transferred into RAM by EasyDMA.

Improving sampling accuracy

SAADC offers multiple techniques to improve accuracy. Noise shaping modes provide the highest performance by enabling a delta-sigma configuration with analog filtering, oversampling, and digital filtering. Pure oversampling is also supported.

Oversampling

Oversampling can improve the signal-to-noise ratio (SNR) by approximately 10log(OSR), where OSR is the oversampling ratio. Each oversampled result is obtained by acquiring 2OVERSAMPLE samples and combining them in an accumulate-and-average filter.

Oversampling and scanning can only be combined with BURST mode enabled. Without BURST mode, oversampling and scanning will average across multiple input channels.

The OVERSAMPLE register controls the accumulator. 2OVERSAMPLE samples must be taken before the result is written to RAM. This can be achieved by either of the following:
  • Use the built-in SAADC local timer and the SAMPLERATE register to perform sampling.
  • Use the TIMER peripheral and DPPI to trigger the SAADC SAMPLE task, to sample 2OVERSAMPLE times at a fixed rate.
  • Trigger the SAMPLE task 2OVERSAMPLE times from software.
  • Enable BURST mode and trigger the SAMPLE task once.

BURST mode can be enabled to avoid manually triggering the SAMPLE task 2OVERSAMPLE times. When BURST is enabled, the ADC automatically samples the input 2OVERSAMPLE times consecutively, with an approximate timing of (tACQ + tCONV) × 2OVERSAMPLE. Apart from extending the conversion time, it otherwise behaves like one-shot mode.

A DONE event indicates that a single sample has been acquired, while a RESULTDONE event indicates that enough samples have been gathered to transfer an oversampled result to RAM.

Noise shaping

Noise shaping is implemented using the successive approximation ADC within a first-order delta-sigma loop. The output is decimated and subsequently filtered with FIR filters. In the noisehaping modes, the sampling rate is 1 MS/s, and high-resolution settings (RESOLUTION ≥ 12) are recommended. Enable noise shaping by configuring the NOISESHAPE register. Depending on the selected mode, the input signal must be bandwidth limited. See Electrical specification parameters fBW,NS for details.

The noise shaping are configured using the NOISESHAPE register.
  • 0: Disabled: Disable noise shaping.
  • NS1: Noise shaping and decimation by 8, giving a samplerate of 125 kS/s.
  • NS2: Noise shaping and decimation by 32, giving a samplerate of 31.25 kS/s. Recommended resolution setting is 14 bits.

Scan mode

A channel is considered enabled if CH[n].PSELP is set. If more than one channel, CH[n], is enabled, the ADC enters scan mode.

In scan mode, one SAMPLE task will trigger one conversion per enabled channel. The time it takes to sample all channels is:

Total time < Sum(CH[x].tACQ+tCONV), x=0..enabled channels

A DONE event signals that one channel has been sampled.

In this mode, the RESULTDONE event comes after each sample, that is, once for each channel.

EasyDMA

After configuring RESULT.PTR and RESULT.MAXCNT, the ADC resources are started by triggering the START task. The ADC is using EasyDMA to store results in a Result buffer in RAM.

The Result buffer is located at the address specified in the RESULT.PTR register. The RESULT.PTR register is double-buffered and it can be updated and prepared for the next START task immediately after the STARTED event is generated. The size of the Result buffer (in bytes) is specified in the RESULT.MAXCNT register and the ADC will generate an END event when it has filled up the Result buffer, see ADC. Results are stored in little-endian byte order in Data RAM. Every sample will be sign extended to 16 bit before stored in the Result buffer.

The ADC is stopped by triggering the STOP task. The STOP task will terminate an ongoing sampling. The ADC will generate a STOPPED event when it has stopped. If the ADC is already stopped when the STOP task is triggered, the STOPPED event will still be generated.

Figure 2. ADC
ADC

If the RESULT.PTR is not pointing to a RAM region accessible from the peripheral, an EasyDMA transfer may result in a HardFault and/or memory corruption. See Memory for more information about the different memory regions.

The EasyDMA will have finished accessing the RAM when the END or STOPPED event has been generated.

The RESULT.AMOUNT register can be read following an END event or a STOPPED event to see how many bytes have been transferred to the Result buffer in RAM since the START task was triggered.

In scan mode, SAMPLE tasks can be triggered once the START task is triggered. The END event is generated when the number of samples transferred to memory reaches the value specified by RESULT.MAXCNT. After an END event, the START task needs to be triggered again before new samples can be taken.For more information about the scan mode, see Scan mode.

Note: Ensure the Result buffer can hold at least one result for each enabled channel by setting RESULT.MAXCNT ≥ 2 × (number of enabled channels). Each sample requires two bytes. Insufficient space leads to undefined behavior.

Reference

The ADC can use different reference voltages VREF, controlled in the REFSEL field of the CH[n].CONFIG register.

These are:

Note: The external reference voltage should be close the internal reference voltage. Preferably no more than 5% deviation from the internal reference voltage, VREF. Using a lower reference voltage will lead to increased leakage, and can lead to undefined behaviour.

The SAADC is preceded by a gain stage which has a programmable gain. The voltage range seen at the input of the gain stage is:

VRangeDifferential = ± VREF/GAIN
VRangeSingleEnded = ± 0.5*VREF/GAIN

The AIN0-AIN7 inputs cannot exceed VDD, or be lower than VSS. The input ranges are also limited by the REFERENCE and GAIN used. The condition

 [V(P) - V(N) ] * GAIN/REFERENCE <= 1 

must always hold true for valid measurements, otherwise the ADC will saturate and report the max value determined by the RESOLUTION.

Acquisition time

To sample the input voltage, the ADC connects a capacitor to the input.

For illustration, see the following figure. The acquisition time indicates how long the capacitor is connected, see TACQ field in CH[n].CONFIG register. The required acquisition time depends on the source (Rsource) resistance. For high source resistance the acquisition time should be increased, see Acquisition time.

Figure 3. Simplified ADC sample network
Table 1. Acquisition time
TACQMaximum source resistance [kOhm]
≤1<1
310
540
10100
15200
20400
40800

Limits event monitoring

A channel can be event monitored by configuring limit register CH[n].LIMIT.

If the conversion result is higher than the defined high limit, or lower than the defined low limit, the appropriate event will be generated.

Figure 4. Example of limits monitoring on channel 'n'

Note that when setting the limits, CH[n].LIMIT.HIGH shall always be higher than or equal to CH[n].LIMIT.LOW. In other words, an event can be generated only when the input signal has been sampled outside of the defined limits. It is not possible to fire an event when the input signal is inside a defined range by swapping high and low limits.

The comparison to limits always takes place, there is no need to enable it. If comparison is not required on a channel, the software shall simply ignore the related events. In that situation, the value of the limits registers is irrelevant, so it does not matter if CH[n].LIMIT.LOW is lower than CH[n].LIMIT.HIGH or not.

Performance factors

Clock jitter, affecting sample timing accuracy, and circuit noise can affect ADC performance.

Jitter can be between START tasks or from START task to acquisition. START timer accuracy and startup times of regulators and references will contribute to variability. Sources of circuit noise may include CPU activity and the DC/DC regulator. Best ADC performance is achieved using START timing based on the TIMER module, HFXO clock source, and Constant Latency mode.

Registers

Instances

InstanceDomainBase addressTrustZoneSplit accessDescription
MapAttDMA
SAADC : S
SAADC : NS
GLOBAL0x500D5000
0x400D5000
USSSANoSuccessive approximation analog-to-digital converter SAADC

Configuration

InstanceDomainConfiguration
SAADC : S
SAADC : NS
GLOBALCURRENTAMOUNT register not included.

Register overview

RegisterOffsetTZDescription
TASKS_START0x000Start the ADC and prepare the result buffer in RAM
TASKS_SAMPLE0x004Take one ADC sample, if scan is enabled all channels are sampled. This task requires that SAADC has started, i.e. EVENTS_STARTED was set and EVENTS_STOPPED was not.
TASKS_STOP0x008Stop the ADC and terminate any on-going conversion
TASKS_CALIBRATEOFFSET0x00CStarts offset auto-calibration
SUBSCRIBE_START0x080Subscribe configuration for task START
SUBSCRIBE_SAMPLE0x084Subscribe configuration for task SAMPLE
SUBSCRIBE_STOP0x088Subscribe configuration for task STOP
SUBSCRIBE_CALIBRATEOFFSET0x08CSubscribe configuration for task CALIBRATEOFFSET
EVENTS_STARTED0x100The ADC DMA has started
EVENTS_END0x104The ADC has filled up the Result buffer
EVENTS_DONE0x108A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM.
EVENTS_RESULTDONE0x10CA result is ready to get transferred to RAM.
EVENTS_CALIBRATEDONE0x110Calibration is complete
EVENTS_STOPPED0x114The ADC DMA has stopped
EVENTS_CH[n].LIMITH0x118Last results is above CH[n].LIMIT.HIGH
EVENTS_CH[n].LIMITL0x11CLast results is below CH[n].LIMIT.LOW
PUBLISH_STARTED0x180Publish configuration for event STARTED
PUBLISH_END0x184Publish configuration for event END
PUBLISH_DONE0x188Publish configuration for event DONE
PUBLISH_RESULTDONE0x18CPublish configuration for event RESULTDONE
PUBLISH_CALIBRATEDONE0x190Publish configuration for event CALIBRATEDONE
PUBLISH_STOPPED0x194Publish configuration for event STOPPED
PUBLISH_CH[n].LIMITH0x198Publish configuration for event CH[n].LIMITH
PUBLISH_CH[n].LIMITL0x19CPublish configuration for event CH[n].LIMITL
SHORTS0x200Shortcuts between local events and tasks
INTEN0x300Enable or disable interrupt
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
STATUS0x400Status
TRIM.LINCALCOEFF[n]0x440Linearity calibration coefficient
ENABLE0x500Enable or disable ADC
CH[n].PSELP0x510Input positive pin selection for CH[n]
CH[n].PSELN0x514Input negative pin selection for CH[n]
CH[n].CONFIG0x518Input configuration for CH[n]
CH[n].LIMIT0x51CHigh/low limits for event monitoring a channel
RESOLUTION0x5F0Resolution configuration
OVERSAMPLE0x5F4Oversampling configuration. OVERSAMPLE should not be combined with SCAN unless burst is enabled. The RESOLUTION is applied before averaging, thus for high OVERSAMPLE a higher RESOLUTION should be used.
SAMPLERATE0x5F8Configures the sampling rate for either task-triggered or continuous operation using a local timer
RESULT.PTR0x62CData pointer
RESULT.MAXCNT0x630Maximum number of buffer bytes to transfer. Note that one sample is two bytes.
RESULT.AMOUNT0x634Number of buffer bytes transferred since last START, updated after the END or STOPPED events
RESULT.CURRENTAMOUNT0x638Number of buffer bytes transferred since last START, continuously updated
NOISESHAPE0x654SAADC provides two operational noise shaping modes (one that prioritizes higher bandwith, while the other prioritizes higher accuracy) that allow trade-offs between ADC resolution, power consumption, and signal bandwidth.

TASKS_START

Address offset: 0x000

Start the ADC and prepare the result buffer in RAM

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
AWTASKS_STARTStart the ADC and prepare the result buffer in RAM
Trigger1Trigger task

TASKS_SAMPLE

Address offset: 0x004

Take one ADC sample, if scan is enabled all channels are sampled. This task requires that SAADC has started, i.e. EVENTS_STARTED was set and EVENTS_STOPPED was not.

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
AWTASKS_SAMPLETake one ADC sample, if scan is enabled all channels are sampled. This task requires that SAADC has started, i.e. EVENTS_STARTED was set and EVENTS_STOPPED was not.
Trigger1Trigger task

TASKS_STOP

Address offset: 0x008

Stop the ADC and terminate any on-going conversion

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
AWTASKS_STOPStop the ADC and terminate any on-going conversion
Trigger1Trigger task

TASKS_CALIBRATEOFFSET

Address offset: 0x00C

Starts offset auto-calibration

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
AWTASKS_CALIBRATEOFFSETStarts offset auto-calibration
Trigger1Trigger task

SUBSCRIBE_START

Address offset: 0x080

Subscribe configuration for task START

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that task START will subscribe to
BRWEN
Disabled0Disable subscription
Enabled1Enable subscription

SUBSCRIBE_SAMPLE

Address offset: 0x084

Subscribe configuration for task SAMPLE

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that task SAMPLE will subscribe to
BRWEN
Disabled0Disable subscription
Enabled1Enable subscription

SUBSCRIBE_STOP

Address offset: 0x088

Subscribe configuration for task STOP

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that task STOP will subscribe to
BRWEN
Disabled0Disable subscription
Enabled1Enable subscription

SUBSCRIBE_CALIBRATEOFFSET

Address offset: 0x08C

Subscribe configuration for task CALIBRATEOFFSET

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that task CALIBRATEOFFSET will subscribe to
BRWEN
Disabled0Disable subscription
Enabled1Enable subscription

EVENTS_STARTED

Address offset: 0x100

The ADC DMA has started

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWEVENTS_STARTEDThe ADC DMA has started
NotGenerated0Event not generated
Generated1Event generated

EVENTS_END

Address offset: 0x104

The ADC has filled up the Result buffer

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWEVENTS_ENDThe ADC has filled up the Result buffer
NotGenerated0Event not generated
Generated1Event generated

EVENTS_DONE

Address offset: 0x108

A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM.

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWEVENTS_DONEA conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM.
NotGenerated0Event not generated
Generated1Event generated

EVENTS_RESULTDONE

Address offset: 0x10C

A result is ready to get transferred to RAM.

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWEVENTS_RESULTDONEA result is ready to get transferred to RAM.
NotGenerated0Event not generated
Generated1Event generated

EVENTS_CALIBRATEDONE

Address offset: 0x110

Calibration is complete

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWEVENTS_CALIBRATEDONECalibration is complete
NotGenerated0Event not generated
Generated1Event generated

EVENTS_STOPPED

Address offset: 0x114

The ADC DMA has stopped

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWEVENTS_STOPPEDThe ADC DMA has stopped
NotGenerated0Event not generated
Generated1Event generated

EVENTS_CH[n]

Peripheral events.

EVENTS_CH[n].LIMITH

Address offset: 0x118 + (n × 0x8)

Last results is above CH[n].LIMIT.HIGH

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWLIMITHLast results is above CH[n].LIMIT.HIGH
NotGenerated0Event not generated
Generated1Event generated

EVENTS_CH[n].LIMITL

Address offset: 0x11C + (n × 0x8)

Last results is below CH[n].LIMIT.LOW

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWLIMITLLast results is below CH[n].LIMIT.LOW
NotGenerated0Event not generated
Generated1Event generated

PUBLISH_STARTED

Address offset: 0x180

Publish configuration for event STARTED

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event STARTED will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing

PUBLISH_END

Address offset: 0x184

Publish configuration for event END

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event END will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing

PUBLISH_DONE

Address offset: 0x188

Publish configuration for event DONE

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event DONE will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing

PUBLISH_RESULTDONE

Address offset: 0x18C

Publish configuration for event RESULTDONE

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event RESULTDONE will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing

PUBLISH_CALIBRATEDONE

Address offset: 0x190

Publish configuration for event CALIBRATEDONE

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event CALIBRATEDONE will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing

PUBLISH_STOPPED

Address offset: 0x194

Publish configuration for event STOPPED

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event STOPPED will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing

PUBLISH_CH[n]

Publish configuration for events

PUBLISH_CH[n].LIMITH

Address offset: 0x198 + (n × 0x8)

Publish configuration for event CH[n].LIMITH

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event CH[n].LIMITH will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing

PUBLISH_CH[n].LIMITL

Address offset: 0x19C + (n × 0x8)

Publish configuration for event CH[n].LIMITL

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event CH[n].LIMITL will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing

SHORTS

Address offset: 0x200

Shortcuts between local events and tasks

Bit number313029282726252423222120191817161514131211109876543210
IDBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWDONE_SAMPLEShortcut between event DONE and task SAMPLE
Disabled0Disable shortcut
Enabled1Enable shortcut
BRWEND_STARTShortcut between event END and task START
Disabled0Disable shortcut
Enabled1Enable shortcut

INTEN

Address offset: 0x300

Enable or disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IDVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWSTARTEDEnable or disable interrupt for event STARTED
Disabled0Disable
Enabled1Enable
BRWENDEnable or disable interrupt for event END
Disabled0Disable
Enabled1Enable
CRWDONEEnable or disable interrupt for event DONE
Disabled0Disable
Enabled1Enable
DRWRESULTDONEEnable or disable interrupt for event RESULTDONE
Disabled0Disable
Enabled1Enable
ERWCALIBRATEDONEEnable or disable interrupt for event CALIBRATEDONE
Disabled0Disable
Enabled1Enable
FRWSTOPPEDEnable or disable interrupt for event STOPPED
Disabled0Disable
Enabled1Enable
GRWCH0LIMITHEnable or disable interrupt for event CH0LIMITH
Disabled0Disable
Enabled1Enable
HRWCH0LIMITLEnable or disable interrupt for event CH0LIMITL
Disabled0Disable
Enabled1Enable
IRWCH1LIMITHEnable or disable interrupt for event CH1LIMITH
Disabled0Disable
Enabled1Enable
JRWCH1LIMITLEnable or disable interrupt for event CH1LIMITL
Disabled0Disable
Enabled1Enable
KRWCH2LIMITHEnable or disable interrupt for event CH2LIMITH
Disabled0Disable
Enabled1Enable
LRWCH2LIMITLEnable or disable interrupt for event CH2LIMITL
Disabled0Disable
Enabled1Enable
MRWCH3LIMITHEnable or disable interrupt for event CH3LIMITH
Disabled0Disable
Enabled1Enable
NRWCH3LIMITLEnable or disable interrupt for event CH3LIMITL
Disabled0Disable
Enabled1Enable
ORWCH4LIMITHEnable or disable interrupt for event CH4LIMITH
Disabled0Disable
Enabled1Enable
PRWCH4LIMITLEnable or disable interrupt for event CH4LIMITL
Disabled0Disable
Enabled1Enable
QRWCH5LIMITHEnable or disable interrupt for event CH5LIMITH
Disabled0Disable
Enabled1Enable
RRWCH5LIMITLEnable or disable interrupt for event CH5LIMITL
Disabled0Disable
Enabled1Enable
SRWCH6LIMITHEnable or disable interrupt for event CH6LIMITH
Disabled0Disable
Enabled1Enable
TRWCH6LIMITLEnable or disable interrupt for event CH6LIMITL
Disabled0Disable
Enabled1Enable
URWCH7LIMITHEnable or disable interrupt for event CH7LIMITH
Disabled0Disable
Enabled1Enable
VRWCH7LIMITLEnable or disable interrupt for event CH7LIMITL
Disabled0Disable
Enabled1Enable

INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IDVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARW
W1S
STARTEDWrite '1' to enable interrupt for event STARTED
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
BRW
W1S
ENDWrite '1' to enable interrupt for event END
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
CRW
W1S
DONEWrite '1' to enable interrupt for event DONE
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
DRW
W1S
RESULTDONEWrite '1' to enable interrupt for event RESULTDONE
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
ERW
W1S
CALIBRATEDONEWrite '1' to enable interrupt for event CALIBRATEDONE
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
FRW
W1S
STOPPEDWrite '1' to enable interrupt for event STOPPED
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
GRW
W1S
CH0LIMITHWrite '1' to enable interrupt for event CH0LIMITH
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
HRW
W1S
CH0LIMITLWrite '1' to enable interrupt for event CH0LIMITL
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
IRW
W1S
CH1LIMITHWrite '1' to enable interrupt for event CH1LIMITH
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
JRW
W1S
CH1LIMITLWrite '1' to enable interrupt for event CH1LIMITL
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
KRW
W1S
CH2LIMITHWrite '1' to enable interrupt for event CH2LIMITH
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
LRW
W1S
CH2LIMITLWrite '1' to enable interrupt for event CH2LIMITL
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
MRW
W1S
CH3LIMITHWrite '1' to enable interrupt for event CH3LIMITH
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
NRW
W1S
CH3LIMITLWrite '1' to enable interrupt for event CH3LIMITL
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
ORW
W1S
CH4LIMITHWrite '1' to enable interrupt for event CH4LIMITH
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
PRW
W1S
CH4LIMITLWrite '1' to enable interrupt for event CH4LIMITL
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
QRW
W1S
CH5LIMITHWrite '1' to enable interrupt for event CH5LIMITH
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
RRW
W1S
CH5LIMITLWrite '1' to enable interrupt for event CH5LIMITL
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
SRW
W1S
CH6LIMITHWrite '1' to enable interrupt for event CH6LIMITH
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
TRW
W1S
CH6LIMITLWrite '1' to enable interrupt for event CH6LIMITL
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
URW
W1S
CH7LIMITHWrite '1' to enable interrupt for event CH7LIMITH
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
VRW
W1S
CH7LIMITLWrite '1' to enable interrupt for event CH7LIMITL
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IDVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARW
W1C
STARTEDWrite '1' to disable interrupt for event STARTED
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
BRW
W1C
ENDWrite '1' to disable interrupt for event END
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
CRW
W1C
DONEWrite '1' to disable interrupt for event DONE
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
DRW
W1C
RESULTDONEWrite '1' to disable interrupt for event RESULTDONE
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
ERW
W1C
CALIBRATEDONEWrite '1' to disable interrupt for event CALIBRATEDONE
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
FRW
W1C
STOPPEDWrite '1' to disable interrupt for event STOPPED
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
GRW
W1C
CH0LIMITHWrite '1' to disable interrupt for event CH0LIMITH
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
HRW
W1C
CH0LIMITLWrite '1' to disable interrupt for event CH0LIMITL
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
IRW
W1C
CH1LIMITHWrite '1' to disable interrupt for event CH1LIMITH
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
JRW
W1C
CH1LIMITLWrite '1' to disable interrupt for event CH1LIMITL
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
KRW
W1C
CH2LIMITHWrite '1' to disable interrupt for event CH2LIMITH
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
LRW
W1C
CH2LIMITLWrite '1' to disable interrupt for event CH2LIMITL
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
MRW
W1C
CH3LIMITHWrite '1' to disable interrupt for event CH3LIMITH
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
NRW
W1C
CH3LIMITLWrite '1' to disable interrupt for event CH3LIMITL
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
ORW
W1C
CH4LIMITHWrite '1' to disable interrupt for event CH4LIMITH
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
PRW
W1C
CH4LIMITLWrite '1' to disable interrupt for event CH4LIMITL
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
QRW
W1C
CH5LIMITHWrite '1' to disable interrupt for event CH5LIMITH
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
RRW
W1C
CH5LIMITLWrite '1' to disable interrupt for event CH5LIMITL
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
SRW
W1C
CH6LIMITHWrite '1' to disable interrupt for event CH6LIMITH
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
TRW
W1C
CH6LIMITLWrite '1' to disable interrupt for event CH6LIMITL
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
URW
W1C
CH7LIMITHWrite '1' to disable interrupt for event CH7LIMITH
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
VRW
W1C
CH7LIMITLWrite '1' to disable interrupt for event CH7LIMITL
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

STATUS

Address offset: 0x400

Status

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARSTATUSStatus
Ready0ADC is ready. No on-going conversion.
Busy1ADC is busy. Conversion is in progress.

TRIM.LINCALCOEFF[n]

Address offset: 0x440 + (n × 0x4)

Linearity calibration coefficient

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWVAL0..65535value

ENABLE

Address offset: 0x500

Enable or disable ADC

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWENABLEEnable or disable ADC
Disabled0Disable ADC
Enabled1

Enable ADC

When enabled, the ADC will acquire access to the GPIO pins specified in the CH[n].PSELP and CH[n].PSELN registers.

CH[n].PSELP

Address offset: 0x510 + (n × 0x10)

Input positive pin selection for CH[n]

Bit number313029282726252423222120191817161514131211109876543210
IDDDCCBBBBAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWPINGPIO pin selection.
BRWPORTGPIO port selection
CRWINTERNALInternal input selection for analog positive input when CH[n].PSELP.CONNECT = Internal
Avdd0Connected to the internal 0.9V analog supply rail
Dvdd1Connected to the internal 0.9V digital supply rail
Vdd2Connected to VDD
DRWCONNECTConnection
NC0Not connected
AnalogInput1

Select analog input

The analog input is connected based on CH[n].PSELP.PIN and CH[n].PSELP.PORT

Internal2

Selects internal inputs.

The analog input is connected based on CH[n].PSELP.INTERNAL

CH[n].PSELN

Address offset: 0x514 + (n × 0x10)

Input negative pin selection for CH[n]

Bit number313029282726252423222120191817161514131211109876543210
IDDDCCBBBBAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWPINGPIO pin selection.
BRWPORTGPIO Port selection
CRWINTERNALInternal input selection for analog negative input when CH[n].PSELN.CONNECT = Internal
Avdd0Connected to the internal 0.9V analog supply rail
Dvdd1Connected to the internal 0.9V digital supply rail
Vdd2Connected to VDD
DRWCONNECTConnection
NC0Not connected
AnalogInput1

Select analog input

The analog input is connected based on CH[n].PSELN.PIN and CH[n].PSELN.PORT

CH[n].CONFIG

Address offset: 0x518 + (n × 0x10)

Input configuration for CH[n]

Bit number313029282726252423222120191817161514131211109876543210
IDFFFEEEEEEEEEDCBAAA
Reset 0x0002000000000000000000100000000000000000
IDR/WFieldValue IDValueDescription
ARWGAINGain control
Gain202
Gain111
Gain2_322/3
Gain2_432/4
Gain2_542/5
Gain2_652/6
Gain2_762/7
Gain2_872/8
BRWBURSTEnable burst mode
Disabled0Burst mode is disabled (normal operation)
Enabled1Burst mode is enabled. SAADC takes 2^OVERSAMPLE number of samples as fast as it can, and sends the average to Data RAM.
C-RWREFSELReference control
Internal0Internal reference (0.9 V)
External1External reference given at PADC_EXT_REF_1V2
DRWMODEEnable differential mode
SE0Single ended, PSELN will be ignored, negative input to ADC shorted to GND
Diff1Differential
ERWTACQ[1..319]Acquisition time, the time the ADC uses to sample the input voltage. Resulting acquistion time is ((TACQ+1) x 125 ns)
FRWTCONV[1..7]Conversion time. Resulting conversion time is ((TCONV+1) x 250 ns)

CH[n].LIMIT

Address offset: 0x51C + (n × 0x10)

High/low limits for event monitoring a channel

Bit number313029282726252423222120191817161514131211109876543210
IDBBBBBBBBBBBBBBBBAAAAAAAAAAAAAAAA
Reset 0x7FFF800001111111111111111000000000000000
IDR/WFieldValue IDValueDescription
ARWLOW[-32768 to +32767]Low level limit
BRWHIGH[-32768 to +32767]High level limit

RESOLUTION

Address offset: 0x5F0

Resolution configuration

Bit number313029282726252423222120191817161514131211109876543210
IDAAA
Reset 0x0000000100000000000000000000000000000001
IDR/WFieldValue IDValueDescription
ARWVAL

Set the resolution

8bit08 bit
10bit110 bit
12bit212 bit
14bit314 bit

OVERSAMPLE

Address offset: 0x5F4

Oversampling configuration. OVERSAMPLE should not be combined with SCAN unless burst is enabled. The RESOLUTION is applied before averaging, thus for high OVERSAMPLE a higher RESOLUTION should be used.

Bit number313029282726252423222120191817161514131211109876543210
IDAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWOVERSAMPLEOversample control
Bypass0Bypass oversampling
Over2x1Oversample 2x
Over4x2Oversample 4x
Over8x3Oversample 8x
Over16x4Oversample 16x
Over32x5Oversample 32x
Over64x6Oversample 64x
Over128x7Oversample 128x
Over256x8Oversample 256x

SAMPLERATE

Address offset: 0x5F8

Configures the sampling rate for either task-triggered or continuous operation using a local timer

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCC[8..2047]Capture and compare value. Sample rate is 16 MHz/CC
BRWMODESelect mode for sample rate control
Task0Rate is controlled from SAMPLE task
Timers1Rate is controlled from local timer (use CC to control the rate)

RESULT

RESULT EasyDMA channel

RESULT.PTR

Address offset: 0x62C

Data pointer

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWPTR

Data pointer

Note: See the memory chapter for details about which memories are available for EasyDMA.

RESULT.MAXCNT

Address offset: 0x630

Maximum number of buffer bytes to transfer. Note that one sample is two bytes.

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWMAXCNTMaximum number of buffer bytes to transfer. Note that one sample is two bytes.

RESULT.AMOUNT

Address offset: 0x634

Number of buffer bytes transferred since last START, updated after the END or STOPPED events

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARAMOUNTNumber of buffer bytes transferred since last START, updated after the END or STOPPED events.

RESULT.CURRENTAMOUNT

Address offset: 0x638

Number of buffer bytes transferred since last START, continuously updated

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARAMOUNTNumber of buffer bytes transferred since last START, continuously updated.

NOISESHAPE

Address offset: 0x654

SAADC provides two operational noise shaping modes (one that prioritizes higher bandwith, while the other prioritizes higher accuracy) that allow trade-offs between ADC resolution, power consumption, and signal bandwidth.

Note: When using noise shaping, the first RESULTREADY event will take longer to arrive as the filters need to be filled with valid data.
Bit number313029282726252423222120191817161514131211109876543210
IDAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWNOISESHAPENoise shaping configuration
Disable0Disable noiseshaping. Configurable oversampling.
NS11Noiseshaping and decimating. Larger passband. Decimation ratio 8, 125 kS/s, with resulting bandwidth around 45 kHz. Takes precedence over the OVERSAMPLING register.
NS22Noiseshaping and decimating. Smaller passband. Decimation ratio 32, 31.25 kS/s, with resulting bandwidth around 7 kHz. Takes precedence over the OVERSAMPLING register.
Audio1

Use enumerator NS1 for future compatibility.

This enumerator is deprecated.

Accuracy2

Use enumerator NS2 for future compatibility.

This enumerator is deprecated.