TLE986x Device Family SDK
Enumerations | Functions
sdadc.h File Reference

Go to the source code of this file.

Detailed Description

Sigma Delta ADC low level access library.

Version
V0.1.4
Date
28. Feb 2020

Include Graph

Include dependency graph for sdadc.h:

Enumerations

enum  TSDADC_OSR {
  SDADC_OSR_128 = 7, SDADC_OSR_256 = 8, SDADC_OSR_512 = 9, SDADC_OSR_1024 = 10,
  SDADC_OSR_2048 = 11
}
 This enum lists the SDADC Oversampling Ratio. More...
 
enum  TSDADC_DITHVAL {
  SDADC_DITH_0_mV = 0, SDADC_DITH_12_5_mV = 1, SDADC_DITH_25_0_mV = 2, SDADC_DITH_37_5_mV = 3,
  SDADC_DITH_50_0_mV = 4, SDADC_DITH_62_5_mV = 5, SDADC_DITH_75_0_mV = 6, SDADC_DITH_87_5_mV = 7,
  SDADC_DITH_100_0_mV = 8, SDADC_DITH_112_5_mV = 9, SDADC_DITH_125_0_mV = 10, SDADC_DITH_137_5_mV = 11,
  SDADC_DITH_150_0_mV = 12, SDADC_DITH_162_5_mV = 13, SDADC_DITH_175_0_mV = 14, SDADC_DITH_187_5_mV = 15
}
 This enum lists the ADC34 Dither Value. More...
 
enum  TSDADC_EOC_CNT { SDADC_IRQ_AFTER_EVERY_EOC = 0, SDADC_IRQ_AFTER_8TH_EOC = 1, SDADC_IRQ_AFTER_16TH_EOC = 2, SDADC_IRQ_AFTER_32ND_EOC = 3 }
 This enum lists the ADC34 EoC counter. More...
 

Functions

INLINE void SDADC_Ch0_Power_On (void)
 enables ADC3 analog frontend. More...
 
INLINE void SDADC_Ch0_Power_Off (void)
 disables ADC3 analog frontend and ADC3 conversion. More...
 
INLINE void SDADC_Ch1_Power_On (void)
 enables ADC4 analog frontend. More...
 
INLINE void SDADC_Ch1_Power_Off (void)
 disables ADC4 analog frontend and ADC4 conversion. More...
 
INLINE sint16 SDADC_Ch0_Result_Get (void)
 gets ADC3 Result value More...
 
INLINE sint16 SDADC_Ch1_Result_Get (void)
 gets ADC4 Result value More...
 
INLINE void SDADC_Ch0_OverSamplingRatio_Sel (uint32 osr)
 selects ADC3 Oversampling Ratio More...
 
INLINE void SDADC_Ch1_OverSamplingRatio_Sel (uint32 osr)
 selects ADC4 Oversampling Ratio More...
 
INLINE void SDADC_Dithering_En (void)
 enables ADC34 Dithering More...
 
INLINE void SDADC_Dithering_Dis (void)
 disables ADC34 Dithering More...
 
INLINE void SDADC_Dithering_Sel (uint32 dith)
 selects ADC34 Dithering value More...
 
INLINE void SDADC_IRQ_Rate_Sel (uint32 rate)
 selects ADC34 EoC counter (IRQ rate of ADC34) More...
 
INLINE void SDADC_Ch0_SOC_Set (void)
 enables ADC3 conversion More...
 
INLINE void SDADC_Ch0_SOC_Rst (void)
 disables ADC3 conversion More...
 
INLINE void SDADC_Ch1_SOC_Set (void)
 enables ADC4 conversion More...
 
INLINE void SDADC_Ch1_SOC_Rst (void)
 disables ADC4 conversion More...
 
INLINE void SDADC_SOC_Set (void)
 enables ADC3 and ADC4 conversions More...
 
INLINE void SDADC_SOC_Rst (void)
 disables ADC3 and ADC4 conversions More...
 
INLINE uint8 SDADC_Ch0_EOC_Sts (void)
 reads ADC3 End of Conversion Status More...
 
INLINE uint8 SDADC_Ch1_EOC_Sts (void)
 reads ADC4 End of Conversion Status More...
 
INLINE void SDADC_VAREF_Set (void)
 sets ADC34 reference voltage to VAREF More...
 
INLINE void SDADC_VDDEXT_Set (void)
 sets ADC34 reference voltage to VDDEXT More...
 
INLINE void SDADC_Ch0_Offset_Meas_En (void)
 enables ADC3 Offset Measurement More...
 
INLINE void SDADC_Ch0_Offset_Meas_Dis (void)
 disables ADC3 Offset Measurement More...
 
INLINE void SDADC_Ch1_Offset_Meas_En (void)
 enables ADC4 Offset Measurement More...
 
INLINE void SDADC_Ch1_Offset_Meas_Dis (void)
 disables ADC4 Offset Measurement More...
 
INLINE void SDADC_Ch0_Int_Clr (void)
 clears ADC3 EOC Interrupt flag. More...
 
INLINE void SDADC_Ch1_Int_Clr (void)
 clears ADC4 EOC Interrupt flag. More...
 
INLINE void SDADC_Ch0_Int_En (void)
 enables ADC3 EOC Interrupt. More...
 
INLINE void SDADC_Ch0_Int_Dis (void)
 disables ADC3 EOC Interrupt. More...
 
INLINE void SDADC_Ch1_Int_En (void)
 enables ADC4 EOC Interrupt. More...
 
INLINE void SDADC_Ch1_Int_Dis (void)
 disables ADC4 EOC Interrupt. More...
 
void SDADC_Init (void)
 Initializes the SDADC module (ADC3 and ADC4). More...
 

Enumeration Type Documentation

◆ TSDADC_DITHVAL

This enum lists the ADC34 Dither Value.

Enumerator
SDADC_DITH_0_mV 

ADC34 Dither Value - 0 mV

SDADC_DITH_12_5_mV 

ADC34 Dither Value - 12.5 mV

SDADC_DITH_25_0_mV 

ADC34 Dither Value - 25 mV

SDADC_DITH_37_5_mV 

ADC34 Dither Value - 37.5 mV

SDADC_DITH_50_0_mV 

ADC34 Dither Value - 50 mV

SDADC_DITH_62_5_mV 

ADC34 Dither Value - 62.5 mV

SDADC_DITH_75_0_mV 

ADC34 Dither Value - 75 mV

SDADC_DITH_87_5_mV 

ADC34 Dither Value - 87.5 mV

SDADC_DITH_100_0_mV 

ADC34 Dither Value - 100 mV

SDADC_DITH_112_5_mV 

ADC34 Dither Value - 112.5 mV

SDADC_DITH_125_0_mV 

ADC34 Dither Value - 125 mV

SDADC_DITH_137_5_mV 

ADC34 Dither Value - 137.5 mV

SDADC_DITH_150_0_mV 

ADC34 Dither Value - 150 mV

SDADC_DITH_162_5_mV 

ADC34 Dither Value - 162.5 mV

SDADC_DITH_175_0_mV 

ADC34 Dither Value - 175 mV

SDADC_DITH_187_5_mV 

ADC34 Dither Value - 187.5 mV

◆ TSDADC_EOC_CNT

This enum lists the ADC34 EoC counter.

Enumerator
SDADC_IRQ_AFTER_EVERY_EOC 

ADC34 EoC counter - Every

SDADC_IRQ_AFTER_8TH_EOC 

ADC34 EoC counter - 8TH

SDADC_IRQ_AFTER_16TH_EOC 

ADC34 EoC counter - 16TH

SDADC_IRQ_AFTER_32ND_EOC 

ADC34 EoC counter - 32ND

◆ TSDADC_OSR

enum TSDADC_OSR

This enum lists the SDADC Oversampling Ratio.

Enumerator
SDADC_OSR_128 

SDADC Oversampling Ratio - 128

SDADC_OSR_256 

SDADC Oversampling Ratio - 256

SDADC_OSR_512 

SDADC Oversampling Ratio - 512

SDADC_OSR_1024 

SDADC Oversampling Ratio - 1024

SDADC_OSR_2048 

SDADC Oversampling Ratio - 2048

Function Documentation

◆ SDADC_Ch0_EOC_Sts()

INLINE uint8 SDADC_Ch0_EOC_Sts ( void  )

reads ADC3 End of Conversion Status

Return values
1ADC3 conversion terminated
0ADC3 conversion still in progress

Example

This example waits until the End of ADC3 Conversion.

void Example_Function(void)
{
while(SDADC_Ch0_EOC_Sts() == 0)
{
}
}

◆ SDADC_Ch0_Int_Clr()

INLINE void SDADC_Ch0_Int_Clr ( void  )

clears ADC3 EOC Interrupt flag.

Example

This example treats the ADC3 EOC Interrupt.

void Example_Function(void)
{
if (SCUPM->SYS_IS.bit.ADC3_EOC_IS == 1u)
{
ADC34_ADC3_CALLBACK();
}
}

◆ SDADC_Ch0_Int_Dis()

INLINE void SDADC_Ch0_Int_Dis ( void  )

disables ADC3 EOC Interrupt.

Example

This example treats the ADC3 EOC Interrupt.

void Example_Function(void)
{
if (SCUPM->SYS_IS.bit.ADC3_EOC_IS == 1u)
{
ADC34_ADC3_CALLBACK();
}
}

◆ SDADC_Ch0_Int_En()

INLINE void SDADC_Ch0_Int_En ( void  )

enables ADC3 EOC Interrupt.

Example

This example treats the ADC3 EOC Interrupt.

void Example_Function(void)
{
if (SCUPM->SYS_IS.bit.ADC3_EOC_IS == 1u)
{
ADC34_ADC3_CALLBACK();
}
}

◆ SDADC_Ch0_Offset_Meas_Dis()

INLINE void SDADC_Ch0_Offset_Meas_Dis ( void  )

disables ADC3 Offset Measurement

Example

This example disables ADC3 Offset Measurement.

void Example_Function(void)
{
}

◆ SDADC_Ch0_Offset_Meas_En()

INLINE void SDADC_Ch0_Offset_Meas_En ( void  )

enables ADC3 Offset Measurement

Example

This example enables ADC3 Offset Measurement.

void Example_Function(void)
{
}

◆ SDADC_Ch0_OverSamplingRatio_Sel()

INLINE void SDADC_Ch0_OverSamplingRatio_Sel ( uint32  osr)

selects ADC3 Oversampling Ratio

Parameters
osrADC3 Oversampling Ratio

Example

This example configures ADC3 Oversampling Ratio to 256.

void Example_Function(void)
{
}

◆ SDADC_Ch0_Power_Off()

INLINE void SDADC_Ch0_Power_Off ( void  )

disables ADC3 analog frontend and ADC3 conversion.

Example

This example disables ADC3 analog frontend.

void Example_Function(void)
{
}

◆ SDADC_Ch0_Power_On()

INLINE void SDADC_Ch0_Power_On ( void  )

enables ADC3 analog frontend.

Example

This example enables ADC3 analog frontend.

void Example_Function(void)
{
}

◆ SDADC_Ch0_Result_Get()

INLINE sint16 SDADC_Ch0_Result_Get ( void  )

gets ADC3 Result value

Returns
ADC3 Result

Example

This example reads ADC3 Result value.

void Example_Function(void)
{
sint16 sts;
}

◆ SDADC_Ch0_SOC_Rst()

INLINE void SDADC_Ch0_SOC_Rst ( void  )

disables ADC3 conversion

Example

This example disables ADC3 conversion.

void Example_Function(void)
{
}

◆ SDADC_Ch0_SOC_Set()

INLINE void SDADC_Ch0_SOC_Set ( void  )

enables ADC3 conversion

Example

This example enables ADC3 conversion.

void Example_Function(void)
{
}

◆ SDADC_Ch1_EOC_Sts()

INLINE uint8 SDADC_Ch1_EOC_Sts ( void  )

reads ADC4 End of Conversion Status

Return values
1ADC4 conversion terminated
0ADC4 conversion still in progress

Example

This example waits until the End of ADC4 Conversion.

void Example_Function(void)
{
while(SDADC_Ch1_EOC_Sts() == 0)
{
}
}

◆ SDADC_Ch1_Int_Clr()

INLINE void SDADC_Ch1_Int_Clr ( void  )

clears ADC4 EOC Interrupt flag.

Example

This example treats the ADC4 EOC Interrupt.

void Example_Function(void)
{
if (SCUPM->SYS_IS.bit.ADC4_EOC_IS == 1u)
{
ADC34_ADC4_CALLBACK();
}
}

◆ SDADC_Ch1_Int_Dis()

INLINE void SDADC_Ch1_Int_Dis ( void  )

disables ADC4 EOC Interrupt.

Example

This example treats the ADC4 EOC Interrupt.

void Example_Function(void)
{
if (SCUPM->SYS_IS.bit.ADC4_EOC_IS == 1u)
{
ADC34_ADC4_CALLBACK();
}
}

◆ SDADC_Ch1_Int_En()

INLINE void SDADC_Ch1_Int_En ( void  )

enables ADC4 EOC Interrupt.

Example

This example treats the ADC4 EOC Interrupt.

void Example_Function(void)
{
if (SCUPM->SYS_IS.bit.ADC4_EOC_IS == 1u)
{
ADC34_ADC4_CALLBACK();
}
}

◆ SDADC_Ch1_Offset_Meas_Dis()

INLINE void SDADC_Ch1_Offset_Meas_Dis ( void  )

disables ADC4 Offset Measurement

Example

This example disables ADC4 Offset Measurement.

void Example_Function(void)
{
}

◆ SDADC_Ch1_Offset_Meas_En()

INLINE void SDADC_Ch1_Offset_Meas_En ( void  )

enables ADC4 Offset Measurement

Example

This example enables ADC4 Offset Measurement.

void Example_Function(void)
{
}

◆ SDADC_Ch1_OverSamplingRatio_Sel()

INLINE void SDADC_Ch1_OverSamplingRatio_Sel ( uint32  osr)

selects ADC4 Oversampling Ratio

Parameters
osrADC4 Oversampling Ratio

Example

This example configures ADC4 Oversampling Ratio to 1024.

void Example_Function(void)
{
}

◆ SDADC_Ch1_Power_Off()

INLINE void SDADC_Ch1_Power_Off ( void  )

disables ADC4 analog frontend and ADC4 conversion.

Example

This example disables ADC4 analog frontend.

void Example_Function(void)
{
}

◆ SDADC_Ch1_Power_On()

INLINE void SDADC_Ch1_Power_On ( void  )

enables ADC4 analog frontend.

Example

This example enables ADC4 analog frontend.

void Example_Function(void)
{
}

◆ SDADC_Ch1_Result_Get()

INLINE sint16 SDADC_Ch1_Result_Get ( void  )

gets ADC4 Result value

Returns
ADC4 Result

Example

This example reads ADC4 Result value.

void Example_Function(void)
{
sint16 sts;
}

◆ SDADC_Ch1_SOC_Rst()

INLINE void SDADC_Ch1_SOC_Rst ( void  )

disables ADC4 conversion

Example

This example disables ADC4 conversion.

void Example_Function(void)
{

◆ SDADC_Ch1_SOC_Set()

INLINE void SDADC_Ch1_SOC_Set ( void  )

enables ADC4 conversion

Example

This example enables ADC4 conversion.

void Example_Function(void)
{
}

◆ SDADC_Dithering_Dis()

INLINE void SDADC_Dithering_Dis ( void  )

disables ADC34 Dithering

Example

This example disables ADC34 Dithering.

void Example_Function(void)
{
}

◆ SDADC_Dithering_En()

INLINE void SDADC_Dithering_En ( void  )

enables ADC34 Dithering

Example

This example enables ADC34 Dithering.

void Example_Function(void)
{
}

◆ SDADC_Dithering_Sel()

INLINE void SDADC_Dithering_Sel ( uint32  dith)

selects ADC34 Dithering value

Parameters
dithADC34 Dithering value

Example

This example sets ADC34 Dithering value to 1.

void Example_Function(void)
{
}

◆ SDADC_Init()

void SDADC_Init ( void  )

Initializes the SDADC module (ADC3 and ADC4).

◆ SDADC_IRQ_Rate_Sel()

INLINE void SDADC_IRQ_Rate_Sel ( uint32  rate)

selects ADC34 EoC counter (IRQ rate of ADC34)

Parameters
rateEoC counter

Example

This example sets ADC34 EoC counter to IRQ with every EoC.

void Example_Function(void)
{
}

◆ SDADC_SOC_Rst()

INLINE void SDADC_SOC_Rst ( void  )

disables ADC3 and ADC4 conversions

Example

This example disables ADC3 and ADC4 conversions.

void Example_Function(void)
{
}

◆ SDADC_SOC_Set()

INLINE void SDADC_SOC_Set ( void  )

enables ADC3 and ADC4 conversions

Example

This example enables ADC3 and ADC4 conversions.

void Example_Function(void)
{
}

◆ SDADC_VAREF_Set()

INLINE void SDADC_VAREF_Set ( void  )

sets ADC34 reference voltage to VAREF

Example

This example sets ADC34 reference voltage to VAREF.

void Example_Function(void)
{
}

◆ SDADC_VDDEXT_Set()

INLINE void SDADC_VDDEXT_Set ( void  )

sets ADC34 reference voltage to VDDEXT

Example

This example sets ADC34 reference voltage to VDDEXT.

void Example_Function(void)
{
}
SDADC_Ch1_Power_On
INLINE void SDADC_Ch1_Power_On(void)
enables ADC4 analog frontend.
Definition: sdadc.h:174
SDADC_Ch0_OverSamplingRatio_Sel
INLINE void SDADC_Ch0_OverSamplingRatio_Sel(uint32 osr)
selects ADC3 Oversampling Ratio
Definition: sdadc.h:256
SDADC_Ch1_EOC_Sts
INLINE uint8 SDADC_Ch1_EOC_Sts(void)
reads ADC4 End of Conversion Status
Definition: sdadc.h:505
SDADC_SOC_Set
INLINE void SDADC_SOC_Set(void)
enables ADC3 and ADC4 conversions
Definition: sdadc.h:439
SDADC_Dithering_Dis
INLINE void SDADC_Dithering_Dis(void)
disables ADC34 Dithering
Definition: sdadc.h:310
SDADC_VDDEXT_Set
INLINE void SDADC_VDDEXT_Set(void)
sets ADC34 reference voltage to VDDEXT
Definition: sdadc.h:539
SDADC_Ch1_Power_Off
INLINE void SDADC_Ch1_Power_Off(void)
disables ADC4 analog frontend and ADC4 conversion.
Definition: sdadc.h:191
SDADC_Ch1_Int_Dis
INLINE void SDADC_Ch1_Int_Dis(void)
disables ADC4 EOC Interrupt.
Definition: sdadc.h:745
SDADC_Ch1_Int_En
INLINE void SDADC_Ch1_Int_En(void)
enables ADC4 EOC Interrupt.
Definition: sdadc.h:722
SDADC_Ch1_SOC_Rst
INLINE void SDADC_Ch1_SOC_Rst(void)
disables ADC4 conversion
Definition: sdadc.h:420
SDADC_Ch1_SOC_Set
INLINE void SDADC_Ch1_SOC_Set(void)
enables ADC4 conversion
Definition: sdadc.h:402
sint16
signed short sint16
16 bit signed value
Definition: types.h:145
SDADC_Ch0_EOC_Sts
INLINE uint8 SDADC_Ch0_EOC_Sts(void)
reads ADC3 End of Conversion Status
Definition: sdadc.h:482
SCUPM
#define SCUPM
Definition: tle986x.h:6005
SDADC_Ch1_Offset_Meas_Dis
INLINE void SDADC_Ch1_Offset_Meas_Dis(void)
disables ADC4 Offset Measurement
Definition: sdadc.h:611
SDADC_Ch1_Int_Clr
INLINE void SDADC_Ch1_Int_Clr(void)
clears ADC4 EOC Interrupt flag.
Definition: sdadc.h:655
SDADC_Ch0_Result_Get
INLINE sint16 SDADC_Ch0_Result_Get(void)
gets ADC3 Result value
Definition: sdadc.h:214
SDADC_Dithering_Sel
INLINE void SDADC_Dithering_Sel(uint32 dith)
selects ADC34 Dithering value
Definition: sdadc.h:329
SDADC_Ch0_Offset_Meas_En
INLINE void SDADC_Ch0_Offset_Meas_En(void)
enables ADC3 Offset Measurement
Definition: sdadc.h:557
SDADC_Ch0_Offset_Meas_Dis
INLINE void SDADC_Ch0_Offset_Meas_Dis(void)
disables ADC3 Offset Measurement
Definition: sdadc.h:575
SDADC_VAREF_Set
INLINE void SDADC_VAREF_Set(void)
sets ADC34 reference voltage to VAREF
Definition: sdadc.h:522
SDADC_Ch0_Power_Off
INLINE void SDADC_Ch0_Power_Off(void)
disables ADC3 analog frontend and ADC3 conversion.
Definition: sdadc.h:156
SDADC_Ch0_Power_On
INLINE void SDADC_Ch0_Power_On(void)
enables ADC3 analog frontend.
Definition: sdadc.h:139
SDADC_IRQ_Rate_Sel
INLINE void SDADC_IRQ_Rate_Sel(uint32 rate)
selects ADC34 EoC counter (IRQ rate of ADC34)
Definition: sdadc.h:348
SDADC_SOC_Rst
INLINE void SDADC_SOC_Rst(void)
disables ADC3 and ADC4 conversions
Definition: sdadc.h:458
SDADC_Ch0_Int_Dis
INLINE void SDADC_Ch0_Int_Dis(void)
disables ADC3 EOC Interrupt.
Definition: sdadc.h:700
SDADC_Ch0_SOC_Rst
INLINE void SDADC_Ch0_SOC_Rst(void)
disables ADC3 conversion
Definition: sdadc.h:384
SDADC_Ch0_Int_Clr
INLINE void SDADC_Ch0_Int_Clr(void)
clears ADC3 EOC Interrupt flag.
Definition: sdadc.h:633
SDADC_Ch1_Result_Get
INLINE sint16 SDADC_Ch1_Result_Get(void)
gets ADC4 Result value
Definition: sdadc.h:236
SDADC_Ch0_Int_En
INLINE void SDADC_Ch0_Int_En(void)
enables ADC3 EOC Interrupt.
Definition: sdadc.h:677
SDADC_Ch0_SOC_Set
INLINE void SDADC_Ch0_SOC_Set(void)
enables ADC3 conversion
Definition: sdadc.h:366
SDADC_Ch1_OverSamplingRatio_Sel
INLINE void SDADC_Ch1_OverSamplingRatio_Sel(uint32 osr)
selects ADC4 Oversampling Ratio
Definition: sdadc.h:276
SDADC_Ch1_Offset_Meas_En
INLINE void SDADC_Ch1_Offset_Meas_En(void)
enables ADC4 Offset Measurement
Definition: sdadc.h:593
SDADC_Dithering_En
INLINE void SDADC_Dithering_En(void)
enables ADC34 Dithering
Definition: sdadc.h:293