42.7.2 ADC Control Register B (ADC)

Table 42-8. 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: CTRLB
Offset: 0x4
Reset: 0x00000000
Property: Write-Synchronized through SYNCBUSY.CTRLB

Bit 3130292827262524 
          
Access  
Reset  
Bit 2322212019181716 
          
Access  
Reset  
Bit 15141312111098 
 SWCNVEN   STRGENTRGSUSPLSWTRGGSWTRG 
Access R/WR/WR/WR/WR/W/HC 
Reset 00000 
Bit 76543210 
 SAMPRQCNVRTADCORSEL[1:0]ADCHSEL[3:0] 
Access R/WR/W/HCR/WR/WR/WR/WR/WR/W 
Reset 00000000 

Bit 15 – SWCNVEN Software - Controlled Conversion Enable bit

Note: When CTRLB.SWCNVEN = 1, all ADC ADCORSEL[1:0] module channels sample and conversions controlled exclusively by SAMP and RQCNVRT. All hardware triggers and GSWTRG and LSWTRG are disabled for ADC module as specified by ADCORSEL[1:0]. It will place the ADC module and all of its channels defined by ADCORSEL[1:0] under the exclusive control of the CTRLB.SAMP and CT RLB.RQCNVRT bits.
ValueDescription
0Software controlled conversions disable. Traditional ADC hardware triggers as defined by CHNCFG4n and CHNCFG5n will be active if enabled.
1SAMP and RQCNVRT bits control entire ADC module sample and convert respectively for all channels on ADC module as defined by ADCORSEL[1:0]. Setting this bit blocks all other hardware triggers events defined by CHNCFG4n and CHNCFG5n.

Bit 11 – STRGEN Synchronous Trigger Enable bit

Note: This bit is ignored if CTRLB.SWCNVEN=1.
ValueDescription
0Disable automatic ADC hardware CTRLC.CNT counter driven synchronous ADC triggers.
1Enable automated hardware synchronous trigger period defined by CTRLC.CNT register.

Bit 10 – TRGSUSP Trigger Suspend bit

ValueDescription
0Trigger suspend disabled. Triggers if enabled and selected will occur.
1Blocks triggers from starting new ADC conversions but does not disable the ADC Modules or disable trigger capture, (i.e., persistent last trigger event is latched). If trigger capture during trigger suspend is not desired for any channels connected to a certain ADCn, then CTRLD.CHNENn must be cleared then set in that order prior to resetting TRGSUSP. Pulsing down and up CTRLD.CHNENn prior to resetting TRGSUSP will clear ALL pending triggers for ADCn.

Bit 9 – LSWTRG Level Global Software Trigger bit

Note:
  1. This bit is ignored if SWCNVEN = 1.
  2. If SWCNVEN = 0, this bit is not self-clearing and is meant to allow the user software to implement continuous sample/conversions on the associated analog input channel.
ValueDescription
0Global Level Software Trigger disabled.
1Trigger A/D conversions for ADC analog inputs "y" that have selected the LSWTRG bit as the trigger signal through the associated CHNCFG4n.TRGSRC[y] or ADC0 CHNCFG50.TRGSRC[y] = 0b0010 or via the CORCTRLn.STRGSRC value where (n = ADC 0,1,2,3).

Bit 8 – GSWTRG Global Software Trigger bit

This software settable bit will trigger ADC sample/conversion sequences for ADC inputs that have selected the GSWTRG bit as the trigger signal via the associated CHNCFG4n.TRGSRC[y] = 0b0001 value, or through the CORCTRLn.STRGSRC value. This bit is auto cleared on the next APB clock cycle and is meant to implement single conversions on trigger edge-sensitive channels.

Note:
  1. This bit is ignored if SWCNVEN = 1.
  2. If SWCNVEN = 0, this bit is auto cleared by hardware after sampling cycle has been triggered and is meant to implement single sample/conversions on trigger edge-sensitive channels.
ValueDescription
0Disable Global Software Trigger.
1If SWCNVEN = 0, this bit is auto cleared by hardware after sampling cycle has been triggered and is meant to implement single sample/conversions on trigger edge-sensitive channels.

Bit 7 – SAMP Enable the Analog Mux Input and Start Sampling

Note:
  1. This bit is ignored if SWCNVEN = 0.
  2. ADCORSEL[1:0] and ADCHSEL[3:0] must be initialized at or before when the SAMP bit is set.
  3. The SAMP bit will keep the S&H circuit in Sample mode until the bit is cleared by the users software. Also, usage of the SAMP bit will cause settings of respective CORCTRLx.SAMC<9:0> bits to be ignored for the ADCn selected by CTRLB.ADCORSEL[1:0].
  4. The SAMP bit is not a self-clearing bit and it is the responsibility of application software to clear this bit but only after setting the RQCNVRT bit to start the analog-to-digital conversion.
  5. When the SAMP and RQCNVRT bits are used by software routines, all TRGSRCx<4:0> bits and STRGSRC<4:0> bits for the designated ADC module defined by ADCORSEL[1:0] and ADCHSEL[3:0] should be set to ‘00000’ to disable all hardware triggers and prevent them from interfering with the software-controlled sampling command signal SAMP and with the software controlled trigger RQCNVRT.
  6. The SAMP bit should only be used in conjunction with RQCNVRT for user software-controlled sampling and triggering.
ValueDescription
0ADC is not software-controlled sampling the ADC module and channel selected by ADCORSEL[1:0] and ADCHSEL[3:0].
1ADC is sampling and remain sampling for as long as user has this bit set in SW. The sampled analog input for a given ADCn module is defined by the channel selected by ADCORSEL[1:0] and ADCHSEL[3:0] provided SWCNVEN = 1.

Bit 6 – RQCNVRT Request Individual ADC Conversion

Note:
  1. If user’s software sets RQCNVRT = 1, an ADC conversion will begin immediately and terminate the sampling period defined by CORCTRLn.SAMC. This bit is cleared by hardware after the conversion is complete.
  2. If SWCNVEN = 1, after setting this bit the users software must immediately clear the SAMP bit.
  3. This bit is ignored if SWCNVEN = 0, (i.e., if software-controlled sample/conversions are disabled).
ValueDescription
0ADC is not converting if SWCNVEN = 1 or user previously set this bit and the previous ADC conversion is complete for the analog channel that was defined by ADCORSEL[1:0] and ADCHSEL[3:0]
1Terminate sampling and begin conversion of ADC and analog channel defined by ADCORSEL[1:0] and ADCHSEL[3:0]. This bit is cleared by hardware when the conversion is complete.

Bits 5:4 – ADCORSEL[1:0] ADC Module Input Select bits

This binary encoded bit field selects which ADC module is to be used by the CTRLB.SAMP and CTRLB.RQCNVRT bit if SWCNVEN = 1.

Note: These bits are ignored if SWCNVEN = 0.
ValueDescription
0b00ADC Module 0
0b01ADC Module 1
0b10ADC Module 2
0b11ADC Module 3

Bits 3:0 – ADCHSEL[3:0] ADC Module Channel Input Select bits

This binary encoded bit field selects the ADC analog input to be sampled and converted respectively by the SAMP and RQCNVRT bit if SWCNVEN = 1.

Note: These bits are ignored if SWCNVEN = 0.
ADC ModulesADCHSEL[3:0]Analog Channel Input
ADC0

(AIN15:0)

ADC1

(AIN5:0)

ADC2

(AIN5:0)

ADC3

(AIN5:0)

0x0AIN0
0x1AIN1
0x2AIN2
0x3AIN3
0x4AIN4
0x5AIN5
0X61.2v IREF (ADC3)
ADC2 Only0X6Temp Sensor (ADC2)
ADC1 Only0X6VDDCORE (ADC1)
ADC0 Only Channels0X6AIN6
0x7AIN7
0x8AIN8
0x9AIN9
0xAAIN10
0xBAIN11
0xCAIN12
0xDAIN13
0xEAIN14
0xFAIN15