Data Structures | Typedefs | Enumerations | Variables
ADCCC26XX.h File Reference

Detailed Description

ADC driver implementation for the ADC peripheral on CC26XX.


This ADC driver implementation is designed to operate on a ADC peripheral for CC26XX.

Refer to ADC.h for a complete description of APIs & example of use.

#include <stdint.h>
#include <stdbool.h>
#include <ti/drivers/ADC.h>
#include <ti/drivers/PIN.h>
#include <ti/drivers/pin/PINCC26XX.h>
#include <ti/drivers/Power.h>
#include <ti/drivers/power/PowerCC26XX.h>
#include <ti/devices/DeviceFamily.h>
#include <DeviceFamily_constructPath(driverlib/aux_adc.h)>
Include dependency graph for ADCCC26XX.h:

Go to the source code of this file.

Data Structures

struct  ADCCC26XX_HWAttrs
 ADCCC26XX Hardware attributes These fields are used by driverlib APIs and therefore must be populated by driverlib macro definitions. More...
 
struct  ADCCC26XX_Object
 ADCCC26XX Object. More...
 

Typedefs

typedef enum ADCCC26XX_Sampling_Duration ADCCC26XX_Sampling_Duration
 Amount of time the ADC spends sampling the analogue input. More...
 
typedef enum ADCCC26XX_Reference_Source ADCCC26XX_Reference_Source
 Specifies whether the internal reference of the ADC is sourced from the battery voltage or a fixed internal source. More...
 
typedef enum ADCCC26XX_Trigger_Source ADCCC26XX_Trigger_Source
 List of sources the ADC can be configured to trigger off of. More...
 
typedef struct ADCCC26XX_HWAttrs ADCCC26XX_HWAttrs
 ADCCC26XX Hardware attributes These fields are used by driverlib APIs and therefore must be populated by driverlib macro definitions. More...
 
typedef struct ADCCC26XX_Object ADCCC26XX_Object
 ADCCC26XX Object. More...
 

Enumerations

enum  ADCCC26XX_Sampling_Duration {
  ADCCC26XX_SAMPLING_DURATION_2P7_US = AUXADC_SAMPLE_TIME_2P7_US, ADCCC26XX_SAMPLING_DURATION_5P3_US = AUXADC_SAMPLE_TIME_5P3_US, ADCCC26XX_SAMPLING_DURATION_10P6_US = AUXADC_SAMPLE_TIME_10P6_US, ADCCC26XX_SAMPLING_DURATION_21P3_US = AUXADC_SAMPLE_TIME_21P3_US,
  ADCCC26XX_SAMPLING_DURATION_42P6_US = AUXADC_SAMPLE_TIME_42P6_US, ADCCC26XX_SAMPLING_DURATION_85P3_US = AUXADC_SAMPLE_TIME_85P3_US, ADCCC26XX_SAMPLING_DURATION_170_US = AUXADC_SAMPLE_TIME_170_US, ADCCC26XX_SAMPLING_DURATION_341_US = AUXADC_SAMPLE_TIME_341_US,
  ADCCC26XX_SAMPLING_DURATION_682_US = AUXADC_SAMPLE_TIME_682_US, ADCCC26XX_SAMPLING_DURATION_1P37_MS = AUXADC_SAMPLE_TIME_1P37_MS, ADCCC26XX_SAMPLING_DURATION_2P73_MS = AUXADC_SAMPLE_TIME_2P73_MS, ADCCC26XX_SAMPLING_DURATION_5P46_MS = AUXADC_SAMPLE_TIME_5P46_MS,
  ADCCC26XX_SAMPLING_DURATION_10P9_MS = AUXADC_SAMPLE_TIME_10P9_MS
}
 Amount of time the ADC spends sampling the analogue input. More...
 
enum  ADCCC26XX_Reference_Source { ADCCC26XX_FIXED_REFERENCE = AUXADC_REF_FIXED, ADCCC26XX_VDDS_REFERENCE = AUXADC_REF_VDDS_REL }
 Specifies whether the internal reference of the ADC is sourced from the battery voltage or a fixed internal source. More...
 
enum  ADCCC26XX_Trigger_Source { ADCCC26XX_TRIGGER_MANUAL = AUXADC_TRIGGER_MANUAL }
 List of sources the ADC can be configured to trigger off of. More...
 

Variables

const ADC_FxnTable ADCCC26XX_fxnTable
 

Typedef Documentation

§ ADCCC26XX_Sampling_Duration

Amount of time the ADC spends sampling the analogue input.

The analogue to digital conversion process consists of two phases in the CC26XX ADC, the sampling and conversion phases. During the sampling phase, the ADC samples the analogue input signal. The duration of the sampling phase is configurable. Larger input loads require longer sample times for the most accurate results.

§ ADCCC26XX_Reference_Source

Specifies whether the internal reference of the ADC is sourced from the battery voltage or a fixed internal source.

  • In practice, using the internal fixed voltage reference sets the upper range of the ADC to a fixed value. That value is 4.3V with input scaling enabled and ~1.4785V with input scaling disabled. In this mode, the output is a function of the input voltage multiplied by the resolution in alternatives (not bits) divided by the upper voltage range of the ADC. Output = Input (V) * 2^12 / (ADC range (V))
  • Using VDDS as a reference scales the upper range of the ADC with the battery voltage. As the battery depletes and its voltage drops, so does the range of the ADC. This is helpful when measuring signals that are generated relative to the battery voltage. In this mode, the output is a function of the input voltage multiplied by the resolution in alternatives (not bits) divided by VDDS multiplied by a scaling factor derived from the input scaling. Output = Input (V) * 2^12 / (VDDS (V) * Scaling factor), where the scaling factor is ~1.4785/4.3 for input scaling disabled and 1 for input scaling enabled.
Note
The actual reference values are slightly different for each device and are higher than the values specified above. This gain is saved in the FCFG. The function ADC_convertToMicroVolts() must be used to derive actual voltage values. Do not attempt to compare raw values between devices or derive a voltage from them yourself. The results of doing so will only be approximately correct.
Warning
Even though the upper voltage range of the ADC is 4.3 volts in fixed mode with input scaling enabled, the input should never exceed VDDS as per the data sheet.

§ ADCCC26XX_Trigger_Source

List of sources the ADC can be configured to trigger off of.

The ADC driver currently only supports the driver manually triggering a conversion. Support for other trigger sources may be added later.

§ ADCCC26XX_HWAttrs

ADCCC26XX Hardware attributes These fields are used by driverlib APIs and therefore must be populated by driverlib macro definitions.

§ ADCCC26XX_Object

ADCCC26XX Object.

The application must not access any member variables of this structure!

Enumeration Type Documentation

§ ADCCC26XX_Sampling_Duration

Amount of time the ADC spends sampling the analogue input.

The analogue to digital conversion process consists of two phases in the CC26XX ADC, the sampling and conversion phases. During the sampling phase, the ADC samples the analogue input signal. The duration of the sampling phase is configurable. Larger input loads require longer sample times for the most accurate results.

Enumerator
ADCCC26XX_SAMPLING_DURATION_2P7_US 
ADCCC26XX_SAMPLING_DURATION_5P3_US 
ADCCC26XX_SAMPLING_DURATION_10P6_US 
ADCCC26XX_SAMPLING_DURATION_21P3_US 
ADCCC26XX_SAMPLING_DURATION_42P6_US 
ADCCC26XX_SAMPLING_DURATION_85P3_US 
ADCCC26XX_SAMPLING_DURATION_170_US 
ADCCC26XX_SAMPLING_DURATION_341_US 
ADCCC26XX_SAMPLING_DURATION_682_US 
ADCCC26XX_SAMPLING_DURATION_1P37_MS 
ADCCC26XX_SAMPLING_DURATION_2P73_MS 
ADCCC26XX_SAMPLING_DURATION_5P46_MS 
ADCCC26XX_SAMPLING_DURATION_10P9_MS 

§ ADCCC26XX_Reference_Source

Specifies whether the internal reference of the ADC is sourced from the battery voltage or a fixed internal source.

  • In practice, using the internal fixed voltage reference sets the upper range of the ADC to a fixed value. That value is 4.3V with input scaling enabled and ~1.4785V with input scaling disabled. In this mode, the output is a function of the input voltage multiplied by the resolution in alternatives (not bits) divided by the upper voltage range of the ADC. Output = Input (V) * 2^12 / (ADC range (V))
  • Using VDDS as a reference scales the upper range of the ADC with the battery voltage. As the battery depletes and its voltage drops, so does the range of the ADC. This is helpful when measuring signals that are generated relative to the battery voltage. In this mode, the output is a function of the input voltage multiplied by the resolution in alternatives (not bits) divided by VDDS multiplied by a scaling factor derived from the input scaling. Output = Input (V) * 2^12 / (VDDS (V) * Scaling factor), where the scaling factor is ~1.4785/4.3 for input scaling disabled and 1 for input scaling enabled.
Note
The actual reference values are slightly different for each device and are higher than the values specified above. This gain is saved in the FCFG. The function ADC_convertToMicroVolts() must be used to derive actual voltage values. Do not attempt to compare raw values between devices or derive a voltage from them yourself. The results of doing so will only be approximately correct.
Warning
Even though the upper voltage range of the ADC is 4.3 volts in fixed mode with input scaling enabled, the input should never exceed VDDS as per the data sheet.
Enumerator
ADCCC26XX_FIXED_REFERENCE 
ADCCC26XX_VDDS_REFERENCE 

§ ADCCC26XX_Trigger_Source

List of sources the ADC can be configured to trigger off of.

The ADC driver currently only supports the driver manually triggering a conversion. Support for other trigger sources may be added later.

Enumerator
ADCCC26XX_TRIGGER_MANUAL 

Variable Documentation

§ ADCCC26XX_fxnTable

const ADC_FxnTable ADCCC26XX_fxnTable
© Copyright 1995-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale