F29H85x-SDK  26.01.00
 
Sdl_adc_group

Introduction

Files

file  sdl_adc.h
 Header file contains enumerations, structure definitions and function declarations for SDL ADC Module interface.
 

Data Structures

struct  SDL_ADC_Config
 ADC configuration. More...
 
struct  SDL_ADC_RepeaterConfig
 ADC repeater configuration. More...
 
struct  SDL_ADC_ChannelOSTest
 ADC OS detect test parameters. More...
 
struct  SDL_ADC_OSTest
 ADC test configuration entry. More...
 

Functions

bool SDL_ADC_isBaseValid (uint32_t base)
 Checks that that ADC Base address is valid.
 
void SDL_ADC_setPrescaler (uint32_t base, SDL_ADC_ClkPrescale clkPrescale)
 Configures the analog-to-digital converter module prescaler.
 
void SDL_ADC_setInterruptPulseMode (uint32_t base, SDL_ADC_PulseMode pulseMode)
 Sets the timing of the end-of-conversion pulse. This function configures the end-of-conversion (EOC) pulse generated by ADC.
 
void SDL_ADC_enableConverter (uint32_t base)
 Powers down the analog-to-digital converter module. This function powers down the analog circuitry inside the analog core.
 
void SDL_ADC_enableInterrupt (uint32_t base, SDL_ADC_IntNumber adcIntNum)
 Enables an ADC interrupt source. This function enables the indicated ADC interrupt source. Only the sources that are enabled can be reflected to the processor interrupt. Disabled sources have no effect on the processor.
 
void SDL_ADC_disableContinuousMode (uint32_t base, SDL_ADC_IntNumber adcIntNum)
 Disables continuous mode for an ADC interrupt. This function disables continuous mode for the specified ADC interrupt.
 
void SDL_ADC_setInterruptSource (uint32_t base, SDL_ADC_IntNumber adcIntNum, uint16_t intTrigger)
 Sets the source EOC for an analog-to-digital converter interrupt. This function sets which conversion is the source of an ADC interrupt.
 
void SDL_ADC_setInterruptSOCTrigger (uint32_t base, SDL_ADC_SOCNumber socNumber, uint32_t trigger)
 Configures the interrupt SOC trigger of an SOC. This function configures the interrupt start-of-conversion trigger in the ADC module.
 
void SDL_ADC_configOSDetectMode (uint32_t base, SDL_ADC_OSDetectMode modeVal)
 Configures Open/Shorts Detection Circuit Mode. This function configures the open/shorts detection circuit mode of the ADC.
 
void SDL_ADC_clearInterruptStatus (uint32_t base, SDL_ADC_IntNumber adcIntNum)
 Clears ADC interrupt sources. This function clears the specified ADC interrupt sources so that they no longer assert. If not in continuous mode, this function must be called before any further interrupt pulses may occur.
 
void SDL_ADC_forceSOC (uint32_t base, SDL_ADC_SOCNumber socNumber)
 Forces a SOC flag to a 1 in the analog-to-digital converter. This function forces the SOC flag associated with the SOC specified by socNumber. This initiates a conversion once that SOC is given priority. This software trigger can be used whether or not the SOC has been configured to accept some other specific trigger.
 
bool SDL_ADC_getInterruptStatus (uint32_t base, SDL_ADC_IntNumber adcIntNum)
 Gets the current ADC interrupt status. This function returns the interrupt status for the analog-to-digital converter.
 
void SDL_ADC_setupPPB (uint32_t base, uint32_t ppbNumber, SDL_ADC_SOCNumber socNumber)
 Configures a post-processing block (PPB) in the ADC. This function associates a post-processing block with a SOC.
 
void SDL_ADC_setPPBCountLimit (uint32_t base, uint32_t ppbNumber, uint16_t limit)
 Configures PPB count limit. This function configures the PPB oversampling count limit which defines the number of ADC conversions to accumulate before partial sum is automatically loaded to the sum registes.
 
void SDL_ADC_selectPPBSyncInput (uint32_t base, uint32_t ppbNumber, uint16_t syncInput)
 Configures PPB sync input. This function configures desired sync event to transfer partial registers to final registers and reset the partial registers.
 
void SDL_ADC_setupSOC (uint32_t base, SDL_ADC_SOCNumber socNumber, uint32_t trigger, SDL_ADC_Channel channel, uint32_t sampleWindow)
 Configures a start-of-conversion (SOC) in the ADC. This function configures a start-of-conversion (SOC) in the ADC module.
 
uint16_t SDL_ADC_readResult (uint32_t resultBase, SDL_ADC_SOCNumber socNumber)
 Reads the conversion result. This function returns the conversion result that corresponds to the base address.
 
void SDL_ADC_forceRepeaterTriggerSync (uint32_t base, SDL_ADC_RepeaterInst repInstance)
 Forces software sync for the trigger repeater block. This function forces the software sync for the trigger repeater block.
 
void SDL_ADC_forcePPBSync (uint32_t base, uint32_t ppbNumber)
 Forces PPB software sync. This function forces the software sync for the desired PPB.
 
void SDL_ADC_forceRepeaterTrigger (uint32_t base, SDL_ADC_RepeaterInst repInstance)
 Forces software trigger to ADC trigger repeater block. This function forces the selected ADC repeater block.
 
int32_t SDL_ADC_readPPBSum (uint32_t resultBase, uint32_t ppbNumber)
 Reads the oversampled final sum from the PPB. This function returns the processed sum of results that corresponds to the base address and the PPB.
 
int32_t SDL_ADC_init (const SDL_ADC_Config *adcConfig)
 Initialise ADC for the particular instance. User has to configure INLTrim and offsetTrim in the application itself before initializing the particular ADC instance and running the test.
 
int32_t SDL_ADC_configInterrupt (const SDL_ADC_Config *adcConfig, uint16_t intTrigger)
 Configure interrupts for the particular ADC instance. This function performs the complete ADC interrupt setup:
 
int32_t SDL_ADC_setMode (uint32_t base, SDL_ADC_Resolution resolution, SDL_ADC_SignalMode signalMode)
 Configures the analog-to-digital converter resolution and signal mode.
 
int32_t SDL_ADC_configRepeater (uint32_t base, const SDL_ADC_RepeaterConfig *config)
 Configures the trigger repeater. This function configures ADC trigger repeater for repeater mode, trigger and sync along with count, phase delay and spread of triggers.
 
int32_t SDL_ADC_runOpenShortTest (const SDL_ADC_Config *adcConfig, const SDL_ADC_ChannelOSTest *channelConfig, const SDL_ADC_OSTest *adcDetectcfg)
 Executes a sequence of ADC tests. This function performs multiple ADC scale tests(e.g., full, 7/12, 5/12 and zero scale) based on the list of mode and scale pairs provided by the user.
 
int32_t SDL_ADC_configAccumulation (const SDL_ADC_Config *adcConfig, uint16_t accumulationCount, const SDL_ADC_RepeaterConfig *repConfig)
 Initializes the ADC repeater and PPB to accumulate results.
 

Enumerations

enum  SDL_ADC_ClkPrescale {
  SDL_ADC_CLK_DIV_1_0 = 0U , SDL_ADC_CLK_DIV_2_0 = 2U , SDL_ADC_CLK_DIV_2_5 = 3U , SDL_ADC_CLK_DIV_3_0 = 4U ,
  SDL_ADC_CLK_DIV_3_5 = 5U , SDL_ADC_CLK_DIV_4_0 = 6U , SDL_ADC_CLK_DIV_4_5 = 7U , SDL_ADC_CLK_DIV_5_0 = 8U ,
  SDL_ADC_CLK_DIV_5_5 = 9U , SDL_ADC_CLK_DIV_6_0 = 10U , SDL_ADC_CLK_DIV_6_5 = 11U , SDL_ADC_CLK_DIV_7_0 = 12U ,
  SDL_ADC_CLK_DIV_7_5 = 13U , SDL_ADC_CLK_DIV_8_0 = 14U , SDL_ADC_CLK_DIV_8_5 = 15U
}
 ADC clock prescaler. More...
 
enum  SDL_ADC_Resolution { SDL_ADC_RESOLUTION_12BIT = 0x00U , SDL_ADC_RESOLUTION_16BIT = 0x40U }
 ADC Resolutions. More...
 
enum  SDL_ADC_SignalMode { SDL_ADC_MODE_SINGLE_ENDED = 0x00U , SDL_ADC_MODE_DIFFERENTIAL = 0x80U }
 ADC Signal Modes. More...
 
enum  SDL_ADC_PulseMode { SDL_ADC_PULSE_END_OF_ACQ_WIN = 0x00U , SDL_ADC_PULSE_END_OF_CONV = 0x04U }
 ADC Pulse Modes. More...
 
enum  SDL_ADC_IntNumber { SDL_ADC_INT_NUMBER1 = 0U , SDL_ADC_INT_NUMBER2 = 1U , SDL_ADC_INT_NUMBER3 = 2U , SDL_ADC_INT_NUMBER4 = 3U }
 ADC interrupt number. More...
 
enum  SDL_ADC_SOCNumber {
  SDL_ADC_SOC_NUMBER0 = 0U , SDL_ADC_SOC_NUMBER1 = 1U , SDL_ADC_SOC_NUMBER2 = 2U , SDL_ADC_SOC_NUMBER3 = 3U ,
  SDL_ADC_SOC_NUMBER4 = 4U , SDL_ADC_SOC_NUMBER5 = 5U , SDL_ADC_SOC_NUMBER6 = 6U , SDL_ADC_SOC_NUMBER7 = 7U ,
  SDL_ADC_SOC_NUMBER8 = 8U , SDL_ADC_SOC_NUMBER9 = 9U , SDL_ADC_SOC_NUMBER10 = 10U , SDL_ADC_SOC_NUMBER11 = 11U ,
  SDL_ADC_SOC_NUMBER12 = 12U , SDL_ADC_SOC_NUMBER13 = 13U , SDL_ADC_SOC_NUMBER14 = 14U , SDL_ADC_SOC_NUMBER15 = 15U ,
  SDL_ADC_SOC_NUMBER16 = 16U , SDL_ADC_SOC_NUMBER17 = 17U , SDL_ADC_SOC_NUMBER18 = 18U , SDL_ADC_SOC_NUMBER19 = 19U ,
  SDL_ADC_SOC_NUMBER20 = 20U , SDL_ADC_SOC_NUMBER21 = 21U , SDL_ADC_SOC_NUMBER22 = 22U , SDL_ADC_SOC_NUMBER23 = 23U ,
  SDL_ADC_SOC_NUMBER24 = 24U , SDL_ADC_SOC_NUMBER25 = 25U , SDL_ADC_SOC_NUMBER26 = 26U , SDL_ADC_SOC_NUMBER27 = 27U ,
  SDL_ADC_SOC_NUMBER28 = 28U , SDL_ADC_SOC_NUMBER29 = 29U , SDL_ADC_SOC_NUMBER30 = 30U , SDL_ADC_SOC_NUMBER31 = 31U
}
 ADC SOC number. More...
 
enum  SDL_ADC_Channel {
  SDL_ADC_CH_ADCIN0 = 0U , SDL_ADC_CH_ADCIN1 = 1U , SDL_ADC_CH_ADCIN2 = 2U , SDL_ADC_CH_ADCIN3 = 3U ,
  SDL_ADC_CH_ADCIN4 = 4U , SDL_ADC_CH_ADCIN5 = 5U , SDL_ADC_CH_ADCIN6 = 6U , SDL_ADC_CH_ADCIN7 = 7U ,
  SDL_ADC_CH_ADCIN8 = 8U , SDL_ADC_CH_ADCIN9 = 9U , SDL_ADC_CH_ADCIN10 = 10U , SDL_ADC_CH_ADCIN11 = 11U ,
  SDL_ADC_CH_ADCIN12 = 12U , SDL_ADC_CH_ADCIN13 = 13U , SDL_ADC_CH_ADCIN14 = 14U , SDL_ADC_CH_ADCIN15 = 15U ,
  SDL_ADC_CH_ADCIN16 = 16U , SDL_ADC_CH_ADCIN17 = 17U , SDL_ADC_CH_ADCIN18 = 18U , SDL_ADC_CH_ADCIN19 = 19U ,
  SDL_ADC_CH_ADCIN20 = 20U , SDL_ADC_CH_ADCIN21 = 21U , SDL_ADC_CH_ADCIN22 = 22U , SDL_ADC_CH_ADCIN23 = 23U ,
  SDL_ADC_CH_ADCIN24 = 24U , SDL_ADC_CH_ADCIN25 = 25U , SDL_ADC_CH_ADCIN26 = 26U , SDL_ADC_CH_ADCIN27 = 27U ,
  SDL_ADC_CH_ADCIN28 = 28U , SDL_ADC_CH_ADCIN29 = 29U , SDL_ADC_CH_ADCIN30 = 30U , SDL_ADC_CH_ADCIN31 = 31U ,
  SDL_ADC_CH_ADCIN0_ADCIN1 = 0U , SDL_ADC_CH_ADCIN2_ADCIN3 = 2U , SDL_ADC_CH_ADCIN4_ADCIN5 = 4U , SDL_ADC_CH_ADCIN6_ADCIN7 = 6U ,
  SDL_ADC_CH_ADCIN8_ADCIN9 = 8U , SDL_ADC_CH_ADCIN10_ADCIN11 = 10U , SDL_ADC_CH_ADCIN12_ADCIN13 = 12U , SDL_ADC_CH_ADCIN14_ADCIN15 = 14U ,
  SDL_ADC_CH_ADCIN16_ADCIN17 = 16U , SDL_ADC_CH_ADCIN18_ADCIN19 = 18U , SDL_ADC_CH_ADCIN20_ADCIN21 = 20U , SDL_ADC_CH_ADCIN22_ADCIN23 = 22U ,
  SDL_ADC_CH_ADCIN24_ADCIN25 = 24U , SDL_ADC_CH_ADCIN26_ADCIN27 = 26U , SDL_ADC_CH_ADCIN28_ADCIN29 = 28U , SDL_ADC_CH_ADCIN30_ADCIN31 = 30U
}
 ADC channels. More...
 
enum  SDL_ADC_OSDetectMode {
  SDL_ADC_OSDETECT_MODE_DISABLED = 0x0U , SDL_ADC_OSDETECT_MODE_VSSA = 0x1U , SDL_ADC_OSDETECT_MODE_VDDA = 0x2U , SDL_ADC_OSDETECT_MODE_5BY12_VDDA = 0x3U ,
  SDL_ADC_OSDETECT_MODE_7BY12_VDDA = 0x4U
}
 ADC OS detect modes. More...
 
enum  SDL_ADC_OSDetectConfig { SDL_ADC_FULL_SCALE = 0U , SDL_ADC_SEVENbyTWELVE_SCALE = 1U , SDL_ADC_FIVEbyTWELVE_SCALE = 2U , SDL_ADC_ZERO_SCALE = 3U }
 ADC OS detect config. More...
 
enum  SDL_ADC_RepeaterInst { SDL_ADC_REPINST1 = 0U , SDL_ADC_REPINST2 = 1U }
 ADC repeater instance number. More...
 

Macros

#define SDL_ADC_REPCTL_MASK
 
#define SDL_ADC_PPBxTRIPLO_STEP   (SDL_ADC_PPB2TRIPLO - SDL_ADC_PPB1TRIPLO)
 
#define SDL_ADC_PPBxTRIPLO2_STEP   (SDL_ADC_PPB2TRIPLO2 - SDL_ADC_PPB1TRIPLO2)
 
#define SDL_ADC_REPxCTL_STEP   (SDL_ADC_REP2CTL - SDL_ADC_REP1CTL)
 
#define SDL_ADC_PPBxCONFIG_STEP   (SDL_ADC_PPB2CONFIG - SDL_ADC_PPB1CONFIG)
 
#define SDL_ADC_PPBxLIMIT_STEP   (SDL_ADC_PPB2LIMIT - SDL_ADC_PPB1LIMIT)
 
#define SDL_ADC_PPBxCONFIG2_STEP   (SDL_ADC_PPB2CONFIG2 - SDL_ADC_PPB1CONFIG2)
 
#define SDL_ADC_TRIGGER_SW_ONLY   (0U)
 
#define SDL_ADC_TRIGGER_REPEATER1   (40U)
 
#define SDL_ADC_PPB_NUMBER1   (0U)
 
#define SDL_ADC_SYNCIN_DISABLE   (0x0U)
 
#define SDL_ADC_REPMODE_OVERSAMPLING   (0x0U)
 
#define SDL_ADC_INT_SOC_TRIGGER_NONE   (0U)
 
#define SDL_ADC_INT_TRIGGER_EOC0   (0x00U)
 
#define SDL_ADC_INT_TRIGGER_OSINT1   (0x20U)
 
#define SDL_ADC_NUMBER_OF_MEASUREMENTS   (4U)
 
#define SDL_ADC_TIMEOUT_VALUE   (1000U)
 

Macro Definition Documentation

◆ SDL_ADC_REPCTL_MASK

#define SDL_ADC_REPCTL_MASK
Value:
(SDL_ADC_REP1CTL_MODE |\
SDL_ADC_REP1CTL_TRIGGER_MASK |\
SDL_ADC_REP1CTL_SYNCINSEL_MASK)

◆ SDL_ADC_PPBxTRIPLO_STEP

#define SDL_ADC_PPBxTRIPLO_STEP   (SDL_ADC_PPB2TRIPLO - SDL_ADC_PPB1TRIPLO)

◆ SDL_ADC_PPBxTRIPLO2_STEP

#define SDL_ADC_PPBxTRIPLO2_STEP   (SDL_ADC_PPB2TRIPLO2 - SDL_ADC_PPB1TRIPLO2)

◆ SDL_ADC_REPxCTL_STEP

#define SDL_ADC_REPxCTL_STEP   (SDL_ADC_REP2CTL - SDL_ADC_REP1CTL)

◆ SDL_ADC_PPBxCONFIG_STEP

#define SDL_ADC_PPBxCONFIG_STEP   (SDL_ADC_PPB2CONFIG - SDL_ADC_PPB1CONFIG)

◆ SDL_ADC_PPBxLIMIT_STEP

#define SDL_ADC_PPBxLIMIT_STEP   (SDL_ADC_PPB2LIMIT - SDL_ADC_PPB1LIMIT)

◆ SDL_ADC_PPBxCONFIG2_STEP

#define SDL_ADC_PPBxCONFIG2_STEP   (SDL_ADC_PPB2CONFIG2 - SDL_ADC_PPB1CONFIG2)

◆ SDL_ADC_TRIGGER_SW_ONLY

#define SDL_ADC_TRIGGER_SW_ONLY   (0U)

◆ SDL_ADC_TRIGGER_REPEATER1

#define SDL_ADC_TRIGGER_REPEATER1   (40U)

◆ SDL_ADC_PPB_NUMBER1

#define SDL_ADC_PPB_NUMBER1   (0U)

◆ SDL_ADC_SYNCIN_DISABLE

#define SDL_ADC_SYNCIN_DISABLE   (0x0U)

◆ SDL_ADC_REPMODE_OVERSAMPLING

#define SDL_ADC_REPMODE_OVERSAMPLING   (0x0U)

◆ SDL_ADC_INT_SOC_TRIGGER_NONE

#define SDL_ADC_INT_SOC_TRIGGER_NONE   (0U)

◆ SDL_ADC_INT_TRIGGER_EOC0

#define SDL_ADC_INT_TRIGGER_EOC0   (0x00U)

◆ SDL_ADC_INT_TRIGGER_OSINT1

#define SDL_ADC_INT_TRIGGER_OSINT1   (0x20U)

◆ SDL_ADC_NUMBER_OF_MEASUREMENTS

#define SDL_ADC_NUMBER_OF_MEASUREMENTS   (4U)

◆ SDL_ADC_TIMEOUT_VALUE

#define SDL_ADC_TIMEOUT_VALUE   (1000U)

Enumeration Type Documentation

◆ SDL_ADC_ClkPrescale

ADC clock prescaler.

This enum type specifies the value by which the input clock is divided to make the ADCCLK

Enumerator
SDL_ADC_CLK_DIV_1_0 
SDL_ADC_CLK_DIV_2_0 
SDL_ADC_CLK_DIV_2_5 
SDL_ADC_CLK_DIV_3_0 
SDL_ADC_CLK_DIV_3_5 
SDL_ADC_CLK_DIV_4_0 
SDL_ADC_CLK_DIV_4_5 
SDL_ADC_CLK_DIV_5_0 
SDL_ADC_CLK_DIV_5_5 
SDL_ADC_CLK_DIV_6_0 
SDL_ADC_CLK_DIV_6_5 
SDL_ADC_CLK_DIV_7_0 
SDL_ADC_CLK_DIV_7_5 
SDL_ADC_CLK_DIV_8_0 
SDL_ADC_CLK_DIV_8_5 

◆ SDL_ADC_Resolution

ADC Resolutions.

This enum type defines resolution of the conversion

Enumerator
SDL_ADC_RESOLUTION_12BIT 
SDL_ADC_RESOLUTION_16BIT 

◆ SDL_ADC_SignalMode

ADC Signal Modes.

This enum type defines signal modes of ADC module

Enumerator
SDL_ADC_MODE_SINGLE_ENDED 
SDL_ADC_MODE_DIFFERENTIAL 

◆ SDL_ADC_PulseMode

ADC Pulse Modes.

This enum type defines pulse modes of ADC module

Enumerator
SDL_ADC_PULSE_END_OF_ACQ_WIN 
SDL_ADC_PULSE_END_OF_CONV 

◆ SDL_ADC_IntNumber

ADC interrupt number.

This enum type defines interrupt number within the ADC wrapper

Enumerator
SDL_ADC_INT_NUMBER1 
SDL_ADC_INT_NUMBER2 
SDL_ADC_INT_NUMBER3 
SDL_ADC_INT_NUMBER4 

◆ SDL_ADC_SOCNumber

ADC SOC number.

This enum type defines ADC start of conversion values.

Enumerator
SDL_ADC_SOC_NUMBER0 

SOC/EOC number 0.

SDL_ADC_SOC_NUMBER1 

SOC/EOC number 1.

SDL_ADC_SOC_NUMBER2 

SOC/EOC number 2.

SDL_ADC_SOC_NUMBER3 

SOC/EOC number 3.

SDL_ADC_SOC_NUMBER4 

SOC/EOC number 4.

SDL_ADC_SOC_NUMBER5 

SOC/EOC number 5.

SDL_ADC_SOC_NUMBER6 

SOC/EOC number 6.

SDL_ADC_SOC_NUMBER7 

SOC/EOC number 7.

SDL_ADC_SOC_NUMBER8 

SOC/EOC number 8.

SDL_ADC_SOC_NUMBER9 

SOC/EOC number 9.

SDL_ADC_SOC_NUMBER10 

SOC/EOC number 10.

SDL_ADC_SOC_NUMBER11 

SOC/EOC number 11.

SDL_ADC_SOC_NUMBER12 

SOC/EOC number 12.

SDL_ADC_SOC_NUMBER13 

SOC/EOC number 13.

SDL_ADC_SOC_NUMBER14 

SOC/EOC number 14.

SDL_ADC_SOC_NUMBER15 

SOC/EOC number 15.

SDL_ADC_SOC_NUMBER16 

SOC/EOC number 16.

SDL_ADC_SOC_NUMBER17 

SOC/EOC number 17.

SDL_ADC_SOC_NUMBER18 

SOC/EOC number 18.

SDL_ADC_SOC_NUMBER19 

SOC/EOC number 19.

SDL_ADC_SOC_NUMBER20 

SOC/EOC number 20.

SDL_ADC_SOC_NUMBER21 

SOC/EOC number 21.

SDL_ADC_SOC_NUMBER22 

SOC/EOC number 22.

SDL_ADC_SOC_NUMBER23 

SOC/EOC number 23.

SDL_ADC_SOC_NUMBER24 

SOC/EOC number 24.

SDL_ADC_SOC_NUMBER25 

SOC/EOC number 25.

SDL_ADC_SOC_NUMBER26 

SOC/EOC number 26.

SDL_ADC_SOC_NUMBER27 

SOC/EOC number 27.

SDL_ADC_SOC_NUMBER28 

SOC/EOC number 28.

SDL_ADC_SOC_NUMBER29 

SOC/EOC number 29.

SDL_ADC_SOC_NUMBER30 

SOC/EOC number 30.

SDL_ADC_SOC_NUMBER31 

SOC/EOC number 31.

◆ SDL_ADC_Channel

ADC channels.

This enum type defines the channel to be converted.

Enumerator
SDL_ADC_CH_ADCIN0 
SDL_ADC_CH_ADCIN1 
SDL_ADC_CH_ADCIN2 
SDL_ADC_CH_ADCIN3 
SDL_ADC_CH_ADCIN4 
SDL_ADC_CH_ADCIN5 
SDL_ADC_CH_ADCIN6 
SDL_ADC_CH_ADCIN7 
SDL_ADC_CH_ADCIN8 
SDL_ADC_CH_ADCIN9 
SDL_ADC_CH_ADCIN10 
SDL_ADC_CH_ADCIN11 
SDL_ADC_CH_ADCIN12 
SDL_ADC_CH_ADCIN13 
SDL_ADC_CH_ADCIN14 
SDL_ADC_CH_ADCIN15 
SDL_ADC_CH_ADCIN16 
SDL_ADC_CH_ADCIN17 
SDL_ADC_CH_ADCIN18 
SDL_ADC_CH_ADCIN19 
SDL_ADC_CH_ADCIN20 
SDL_ADC_CH_ADCIN21 
SDL_ADC_CH_ADCIN22 
SDL_ADC_CH_ADCIN23 
SDL_ADC_CH_ADCIN24 
SDL_ADC_CH_ADCIN25 
SDL_ADC_CH_ADCIN26 
SDL_ADC_CH_ADCIN27 
SDL_ADC_CH_ADCIN28 
SDL_ADC_CH_ADCIN29 
SDL_ADC_CH_ADCIN30 
SDL_ADC_CH_ADCIN31 
SDL_ADC_CH_ADCIN0_ADCIN1 
SDL_ADC_CH_ADCIN2_ADCIN3 
SDL_ADC_CH_ADCIN4_ADCIN5 
SDL_ADC_CH_ADCIN6_ADCIN7 
SDL_ADC_CH_ADCIN8_ADCIN9 
SDL_ADC_CH_ADCIN10_ADCIN11 
SDL_ADC_CH_ADCIN12_ADCIN13 
SDL_ADC_CH_ADCIN14_ADCIN15 
SDL_ADC_CH_ADCIN16_ADCIN17 
SDL_ADC_CH_ADCIN18_ADCIN19 
SDL_ADC_CH_ADCIN20_ADCIN21 
SDL_ADC_CH_ADCIN22_ADCIN23 
SDL_ADC_CH_ADCIN24_ADCIN25 
SDL_ADC_CH_ADCIN26_ADCIN27 
SDL_ADC_CH_ADCIN28_ADCIN29 
SDL_ADC_CH_ADCIN30_ADCIN31 

◆ SDL_ADC_OSDetectMode

ADC OS detect modes.

This enum type defines the desired open/shorts detection circuit modes.

Enumerator
SDL_ADC_OSDETECT_MODE_DISABLED 
SDL_ADC_OSDETECT_MODE_VSSA 
SDL_ADC_OSDETECT_MODE_VDDA 
SDL_ADC_OSDETECT_MODE_5BY12_VDDA 
SDL_ADC_OSDETECT_MODE_7BY12_VDDA 

◆ SDL_ADC_OSDetectConfig

ADC OS detect config.

This enum type defines the different detect config of ADC.

Enumerator
SDL_ADC_FULL_SCALE 
SDL_ADC_SEVENbyTWELVE_SCALE 
SDL_ADC_FIVEbyTWELVE_SCALE 
SDL_ADC_ZERO_SCALE 

◆ SDL_ADC_RepeaterInst

ADC repeater instance number.

This enum type defines the ADC trigger repeater instance.

Enumerator
SDL_ADC_REPINST1 
SDL_ADC_REPINST2 

Function Documentation

◆ SDL_ADC_isBaseValid()

bool SDL_ADC_isBaseValid ( uint32_t base)

Checks that that ADC Base address is valid.

Parameters
baseADC module base address.
Returns
TRUE - if the base address is valid FALSE - invalid base address

◆ SDL_ADC_setPrescaler()

void SDL_ADC_setPrescaler ( uint32_t base,
SDL_ADC_ClkPrescale clkPrescale )

Configures the analog-to-digital converter module prescaler.

Parameters
baseBase address of the ADC module.
clkPrescaleADC clock prescaler.

This function configures the ADC module's ADCCLK. The clkPrescale parameter specifies the value by which the input clock is divided to make the ADCCLK.

Returns
None

◆ SDL_ADC_setInterruptPulseMode()

void SDL_ADC_setInterruptPulseMode ( uint32_t base,
SDL_ADC_PulseMode pulseMode )

Sets the timing of the end-of-conversion pulse. This function configures the end-of-conversion (EOC) pulse generated by ADC.

Parameters
baseBase address of the ADC module.
pulseModeGeneration mode of the EOC pulse.
Returns
None

◆ SDL_ADC_enableConverter()

void SDL_ADC_enableConverter ( uint32_t base)

Powers down the analog-to-digital converter module. This function powers down the analog circuitry inside the analog core.

Parameters
baseBase address of the ADC module.
Returns
None

◆ SDL_ADC_enableInterrupt()

void SDL_ADC_enableInterrupt ( uint32_t base,
SDL_ADC_IntNumber adcIntNum )

Enables an ADC interrupt source. This function enables the indicated ADC interrupt source. Only the sources that are enabled can be reflected to the processor interrupt. Disabled sources have no effect on the processor.

Parameters
baseBase address of the ADC module.
adcIntNuminterrupt number within the ADC wrapper.
Returns
None

◆ SDL_ADC_disableContinuousMode()

void SDL_ADC_disableContinuousMode ( uint32_t base,
SDL_ADC_IntNumber adcIntNum )

Disables continuous mode for an ADC interrupt. This function disables continuous mode for the specified ADC interrupt.

Parameters
baseBase address of the ADC module.
adcIntNuminterrupt number within the ADC wrapper.
Returns
None

◆ SDL_ADC_setInterruptSource()

void SDL_ADC_setInterruptSource ( uint32_t base,
SDL_ADC_IntNumber adcIntNum,
uint16_t intTrigger )

Sets the source EOC for an analog-to-digital converter interrupt. This function sets which conversion is the source of an ADC interrupt.

Parameters
baseBase address of the ADC module.
adcIntNuminterrupt number within the ADC wrapper.
intTriggerinterrupt trigger to be configured for the ADC module
Returns
None

◆ SDL_ADC_setInterruptSOCTrigger()

void SDL_ADC_setInterruptSOCTrigger ( uint32_t base,
SDL_ADC_SOCNumber socNumber,
uint32_t trigger )

Configures the interrupt SOC trigger of an SOC. This function configures the interrupt start-of-conversion trigger in the ADC module.

Parameters
baseBase address of the ADC module.
socNumbernumber of the start-of-conversion.
triggerinterrupt source that will cause the SOC.
Returns
None

◆ SDL_ADC_configOSDetectMode()

void SDL_ADC_configOSDetectMode ( uint32_t base,
SDL_ADC_OSDetectMode modeVal )

Configures Open/Shorts Detection Circuit Mode. This function configures the open/shorts detection circuit mode of the ADC.

Parameters
baseBase address of the ADC module.
modeValdesired open/shorts detection circuit mode.
Returns
None

◆ SDL_ADC_clearInterruptStatus()

void SDL_ADC_clearInterruptStatus ( uint32_t base,
SDL_ADC_IntNumber adcIntNum )

Clears ADC interrupt sources. This function clears the specified ADC interrupt sources so that they no longer assert. If not in continuous mode, this function must be called before any further interrupt pulses may occur.

Parameters
baseBase address of the ADC module.
adcIntNuminterrupt number within the ADC wrapper.
Returns
None

◆ SDL_ADC_forceSOC()

void SDL_ADC_forceSOC ( uint32_t base,
SDL_ADC_SOCNumber socNumber )

Forces a SOC flag to a 1 in the analog-to-digital converter. This function forces the SOC flag associated with the SOC specified by socNumber. This initiates a conversion once that SOC is given priority. This software trigger can be used whether or not the SOC has been configured to accept some other specific trigger.

Parameters
baseBase address of the ADC module.
socNumbernumber of the start-of-conversion.
Returns
None

◆ SDL_ADC_getInterruptStatus()

bool SDL_ADC_getInterruptStatus ( uint32_t base,
SDL_ADC_IntNumber adcIntNum )

Gets the current ADC interrupt status. This function returns the interrupt status for the analog-to-digital converter.

Parameters
baseBase address of the ADC module.
adcIntNuminterrupt number within the ADC wrapper.
Returns
TRUE - if the interrupt flag for the specified interrupt number is set FALSE - if it is not set.

◆ SDL_ADC_setupPPB()

void SDL_ADC_setupPPB ( uint32_t base,
uint32_t ppbNumber,
SDL_ADC_SOCNumber socNumber )

Configures a post-processing block (PPB) in the ADC. This function associates a post-processing block with a SOC.

Parameters
basebase address of the ADC results.
ppbNumbernumber of the post-processing block.
socNumbernumber of the start-of-conversion.
Returns
None.

◆ SDL_ADC_setPPBCountLimit()

void SDL_ADC_setPPBCountLimit ( uint32_t base,
uint32_t ppbNumber,
uint16_t limit )

Configures PPB count limit. This function configures the PPB oversampling count limit which defines the number of ADC conversions to accumulate before partial sum is automatically loaded to the sum registes.

Parameters
basebase address of the ADC results.
ppbNumbernumber of the post-processing block.
limitdesired PPB count limit.
Returns
None.

◆ SDL_ADC_selectPPBSyncInput()

void SDL_ADC_selectPPBSyncInput ( uint32_t base,
uint32_t ppbNumber,
uint16_t syncInput )
extern

Configures PPB sync input. This function configures desired sync event to transfer partial registers to final registers and reset the partial registers.

Parameters
basebase address of the ADC results.
ppbNumbernumber of the post-processing block.
syncInputthe desired sync event to transfer partial registers to final registers and reset the partial registers.
Returns
None.

◆ SDL_ADC_setupSOC()

void SDL_ADC_setupSOC ( uint32_t base,
SDL_ADC_SOCNumber socNumber,
uint32_t trigger,
SDL_ADC_Channel channel,
uint32_t sampleWindow )
extern

Configures a start-of-conversion (SOC) in the ADC. This function configures a start-of-conversion (SOC) in the ADC module.

Parameters
baseBase address of the ADC module.
socNumbernumber of the start-of-conversion.
triggerinterrupt source that will cause the SOC.
channelnumber associated with the input signal
sampleWindowacquisition window duration.
Returns
None

◆ SDL_ADC_readResult()

uint16_t SDL_ADC_readResult ( uint32_t resultBase,
SDL_ADC_SOCNumber socNumber )
extern

Reads the conversion result. This function returns the conversion result that corresponds to the base address.

Parameters
resultBasebase address of the ADC results.
socNumbernumber of the start-of-conversion.
Returns
Returns the conversion result.

◆ SDL_ADC_forceRepeaterTriggerSync()

void SDL_ADC_forceRepeaterTriggerSync ( uint32_t base,
SDL_ADC_RepeaterInst repInstance )
extern

Forces software sync for the trigger repeater block. This function forces the software sync for the trigger repeater block.

Parameters
basebase address of the ADC results.
repInstancethe repeater instance.
Returns
None.

◆ SDL_ADC_forcePPBSync()

void SDL_ADC_forcePPBSync ( uint32_t base,
uint32_t ppbNumber )
extern

Forces PPB software sync. This function forces the software sync for the desired PPB.

Parameters
basebase address of the ADC results.
ppbNumbernumber of the post-processing block.
Returns
None.

◆ SDL_ADC_forceRepeaterTrigger()

void SDL_ADC_forceRepeaterTrigger ( uint32_t base,
SDL_ADC_RepeaterInst repInstance )
extern

Forces software trigger to ADC trigger repeater block. This function forces the selected ADC repeater block.

Parameters
basebase address of the ADC results.
repInstancethe repeater instance to be triggered.
Returns
None.

◆ SDL_ADC_readPPBSum()

int32_t SDL_ADC_readPPBSum ( uint32_t resultBase,
uint32_t ppbNumber )
extern

Reads the oversampled final sum from the PPB. This function returns the processed sum of results that corresponds to the base address and the PPB.

Parameters
resultBasebase address of the ADC results.
ppbNumbernumber of the post-processing block.
Returns
Returns the oversampled final sum value.

◆ SDL_ADC_init()

int32_t SDL_ADC_init ( const SDL_ADC_Config * adcConfig)

Initialise ADC for the particular instance. User has to configure INLTrim and offsetTrim in the application itself before initializing the particular ADC instance and running the test.

Parameters
adcConfigADC configuration parameters
Returns
SDL_PASS - if the ADC mode configuration is successfull.
SDL_EBADARGS - invalid configuration parameters.

◆ SDL_ADC_configInterrupt()

int32_t SDL_ADC_configInterrupt ( const SDL_ADC_Config * adcConfig,
uint16_t intTrigger )

Configure interrupts for the particular ADC instance. This function performs the complete ADC interrupt setup:

  1. SDL_ADC_enableInterrupt
  2. SDL_ADC_disableContinuousMode
  3. SDL_ADC_setInterruptSource
  4. SDL_ADC_setInterruptSOCTrigger
Parameters
adcConfigADC configuration parameters
intTriggerinterrupt trigger to be configured for the ADC module
Returns
SDL_PASS - valid configuration parameters.
SDL_EBADARGS - invalid configuration parameters.

◆ SDL_ADC_setMode()

int32_t SDL_ADC_setMode ( uint32_t base,
SDL_ADC_Resolution resolution,
SDL_ADC_SignalMode signalMode )
extern

Configures the analog-to-digital converter resolution and signal mode.

Parameters
baseBase address of the ADC module.
resolutionresolution of the converter (12 or 16 bits).
signalModeinput signal mode of the converter.

This function configures the ADC module's conversion resolution and input signal mode and ensures that the corresponding trims are loaded. The resolution parameter specifies the resolution of the conversion. It can be 12-bit or 16-bit specified by SDL_ADC_RESOLUTION_12BIT or SDL_ADC_RESOLUTION_16BIT.

The signalMode parameter specifies the signal mode. In single-ended mode, which is indicated by SDL_ADC_MODE_SINGLE_ENDED, the input voltage is sampled on a single pin referenced to VREFLO. In differential mode, which is indicated by SDL_ADC_MODE_DIFFERENTIAL, the input voltage to the converter is sampled on a pair of input pins, a positive and a negative.

Returns
SDL_EBADARGS - API fails due to invalid base address.
SDL_EFAIL - If ADC resolution is not 12-bit and conversion mode is not single ended.

◆ SDL_ADC_configRepeater()

int32_t SDL_ADC_configRepeater ( uint32_t base,
const SDL_ADC_RepeaterConfig * config )
extern

Configures the trigger repeater. This function configures ADC trigger repeater for repeater mode, trigger and sync along with count, phase delay and spread of triggers.

Parameters
basebase address of the ADC module.
configthe desired repeater configuration.
Returns
SDL_PASS - if the parameters are valid.
SDL_EFAIL - if repInstance and repCount exceeds the limit.
SDL_EBADARGS - if the parameters are invalid.

◆ SDL_ADC_runOpenShortTest()

int32_t SDL_ADC_runOpenShortTest ( const SDL_ADC_Config * adcConfig,
const SDL_ADC_ChannelOSTest * channelConfig,
const SDL_ADC_OSTest * adcDetectcfg )
extern

Executes a sequence of ADC tests. This function performs multiple ADC scale tests(e.g., full, 7/12, 5/12 and zero scale) based on the list of mode and scale pairs provided by the user.

Parameters
adcConfigconfiguration parameter of the ADC module.
channelConfigADC channel configurations.
adcDetectcfgADC detect config parameters.
Returns
SDL_PASS - if the test successful.
SDL_EFAIL - if the test fails.
SDL_EBADARGS - invalid arguments.

◆ SDL_ADC_configAccumulation()

int32_t SDL_ADC_configAccumulation ( const SDL_ADC_Config * adcConfig,
uint16_t accumulationCount,
const SDL_ADC_RepeaterConfig * repConfig )
extern

Initializes the ADC repeater and PPB to accumulate results.

Parameters
adcConfigconfiguration parameter of the ADC module.
accumulationCountADC accumulation count to average out noise.
repConfigADC repeater configuration.
Returns
SDL_PASS- valid parameters.
SDL_EFAIL- if repeater configuration fails.
SDL_EBADARGS- invalid parameters.