42.7.1 Control Enable Register (ADC)

Table 42-6. Register Bit Attribute Legend
SymbolDescriptionSymbolDescriptionSymbolDescription
RReadable bitHCCleared by Hardware(Grey cell)Unimplemented
WWritable bitHSSet by HardwareXBit is unknown at Reset
KWrite to clearSSoftware settable bit
Name: CTRLA
Offset: 0x0
Reset: 0x00000000
Property: PAC Write-Protected

Bit 3130292827262524 
          
Access  
Reset  
Bit 2322212019181716 
          
Access  
Reset  
Bit 15141312111098 
          
Access  
Reset  
Bit 76543210 
 ONDEMANDRUNSTDBY   ANAENENABLESWRST 
Access R/WR/WR/WR/WR/W 
Reset 10000 

Bit 7 – ONDEMAND On Demand Control (idle/standby mode)

The On Demand operation mode allows the ADC to be normally disabled, lowest power mode, until enabled by an EVSYS trigger event. The consequences of this however is that the analog logic is completely powered down when ONDEMAND=1 and clocks are suspended. Upon a EVSYS trigger event, it will require up to 20-50µs for the ADC to warm up meaning that the actual sample/convert sequence will not happen for:

ADC analog input signal sample point in time = (EVSYS Trigger event + CTRLD.WKUPEXP)

Which can be up to 50µs after the initial EVSYS trigger event. After the conversion is complete, if there are no pending EVSYS trigger events the ADC will again power down and the sequence will repeat as before.

When ONDEMAND = 1, the ADC works only on a rising edge EVSYS events. In addition, all other ADC trigger sources other than EVSYS triggers will not be acknowledged and therefore will render the ADC inactive. (See table below)

In Idle and Standby mode, if ONDEMAND = 1 and CTRLA.RUNSTDBY = 1, the ADC will be active and not powered down. If CTRLA.RUNSTDBY=0, the ADC is powered down and ADC clocks are suspended.

Note: CTRLD.WKUPEXP should be set by user to the equivalent of 50 µs or CTRLD.WKUPEXP[xxx] = 50 µs / TAD.
Table 42-7. ONDEMAND Matrix
SYSTEM

STATUS

ONDEMANDRUNSTDBYADCn Trigger SourceADC BEHAVIOR
ACTIVE1xADCn Global Software Trigger.Do Nothing
xADCn Global Level Software TriggerDo Nothing
xADCn SCANTRGDo Nothing except only when SCAN trigger source selected is EVSYS trigger, then RUN only when EVSYS trigger request is received.
xADCn STRIG Synchronous TriggerDo Nothing
xADCn Trigger Event(s) from Event System (EVSYS)RUN only when EVSYS trigger request is received.
0xADCn Global Software Trigger.ADC active, Trigger sample/conv and wait for next trigger
xADCn Global Level Software TriggerADC active, Trigger sample/conv continuously.
xADCn SCANTRGADC active, Trigger sample/conv and wait for next trigger
xADCn STRIG Synchronous TriggerADC active, Trigger sample/conv and wait for next trigger
xADCn Trigger Event(s) from Event System (EVSYS)ADC active, Trigger sample/conv and wait for next trigger.
IDLE,

STANDBY

01All triggers workingADC active
10n/aDo nothing
11ADCn Trigger Event(s) from Event System (EVSYS)RUN only when EVSYS trigger request is received.
ValueDescription
0The ADC is always on, if ENABLE = 1. (Highly Recommended)
1See table below.

Bit 6 – RUNSTDBY Run in Idle/Standby Mode

This bit controls how the ADC behaves during Standby Sleep mode.

This bit is not synchronized.

ValueDescription
0Discontinue module operation when device enters idle/standby mode (but do not stop the CTL_CLK to preserve the analog biasing). The ADC will complete the ongoing conversion before disabling the module.
1The ADC is not stopped in Idle or Standby sleep mode. If CTRLA.ONDEMAND = 1, the ADC will be running when a peripheral is requesting it. If CTRLA.ONDEMAND = 0, the ADC will always be running in standby sleep mode.

Bit 2 – ANAEN Analog Cores Enable bit

Note: This bit must be set prior to setting any of the CTRLD.ANLENn bits.
ValueDescription
0The analog and bias circuitry for all ADC modules are powered down and clocks disabled. Trigger events will not be serviced.
1Enables and powers up the individual ADC modules analog logic based on the settings of CTRLD.ANLENn = 1, (where n = 0,1,2,3). Whenever the ADC module"n" exits a power down state to a powered-up state, CTRLA.ANAEN = 1 and CTRLD.ANLENn = 1, then the system hardware will wait until CTRLD.WKUPEXP time has expired before starting an ADCn sample/conversion if a trigger event is pending. The ADCn required warm-up time is 20-50us before it will stabilize for a valid ADC sample/conversion sequence to start. CTRLA.ENABLE does not need to be set to power-up the analog logic and begin the CTRLD.WKUPEXP time out.

Bit 1 – ENABLE A/D Module Operating Enable bit

Note:
  1. The ENABLE bit should be set only after the ADC module has been configured. Changing the configuration bits after enabling the ADC could result in unpredictable behavior.
  2. When ENABLE = 0 the internal control logic is reset, and all status generated by the module is cleared. All ADC Module clocks are disabled unless ANAEN = 1. In this case ANLENn = 0 disable clocks and ANLENn = 1 enables them. All ADC registers are available for reading and writing.
ValueDescription
0A/D converter is off.
1A/D converter module is enabled.

Bit 0 – SWRST Software Reset

Writing a one to the SWRST bit resets the state of the ADC and all the registers to their initial state. The only exception is the DBGCTRL.DBGRUN bit, which will keep its value after a SWRST. The module will be disabled after the reset (ENABLE = 0). When writing a one to SWRST, no other bits in the same register will be written, as SWRST will clear all the bits in the same register.

After writing a one to SWRST, SWRST will read back one until the module and the registers are reset. Any register write access during the ongoing reset will be discarded and an error will be generated. Read access can be performed without an error generated and must return reset value. Writing a one to SWRST will have priority above all other actions and will always happen immediately.

Writing a zero to SWRST has no effect.

Note: During a SWRST, access to registers/bits without SWRST are disallowed until SYNCBUSY.SWRST is cleared by hardware.
ValueDescription
0There is no reset operation ongoing.
1The reset operation is ongoing.