MTB CAT1 Peripheral driver library
cy_stc_sar_config_t Struct Reference

Description

This structure is used to initialize the SAR ADC subsystem.

The SAR ADC subsystem is highly configurable with many options. When calling Cy_SAR_Init, provide a pointer to the structure containing this configuration data. A set of enumerations is provided in this driver to help with configuring this structure.

See the Initialization and Enable section for guidance.

Data Fields

uint32_t ctrl
 Control register settings (applies to all channels)
 
uint32_t sampleCtrl
 Sample control register settings (applies to all channels)
 
uint32_t sampleTime01
 Sample time in ADC clocks for Sample Time 0 and 1.
 
uint32_t sampleTime23
 Sample time in ADC clocks for Sample Time 2 and 3.
 
uint32_t rangeThres
 Range detect threshold register for all channels.
 
cy_en_sar_range_detect_condition_t rangeCond
 Range detect condition (below, inside, output, or above) for all channels.
 
uint32_t chanEn
 Enable bits for the channels.
 
uint32_t chanConfig [CY_SAR_NUM_CHANNELS]
 Channel configuration.
 
uint32_t intrMask
 Interrupt enable mask.
 
uint32_t satIntrMask
 Saturation detection interrupt enable mask.
 
uint32_t rangeIntrMask
 Range detection interrupt enable mask.
 
uint32_t muxSwitch
 SARMUX firmware switches to connect analog signals to SAR.
 
uint32_t muxSwitchSqCtrl
 Enable SARSEQ control of specific SARMUX switches.
 
bool configRouting
 Configure or ignore routing related registers (muxSwitch, muxSwitchSqCtrl)
 
uint32_t vrefMvValue
 Reference voltage in millivolts used in converting counts to volts.
 
cy_en_sar_clock_source_t clock
 Clock source selection (enable/disable SAR operation in the Deep Sleep mode). More...
 
cy_stc_sar_fifo_config_t const * fifoCfgPtr
 Pointer to the FIFO configuration structure cy_stc_sar_fifo_config_t, if NULL - the FIFO is not used. More...
 
bool trTimer
 SAR is being triggered from the Timer Timer . More...
 
bool scanCnt
 Enable the scanning counter, configured by Cy_SAR_CommonInit. More...
 
bool scanCntIntr
 EOS interrupt on scanning counter event. More...
 

Field Documentation

◆ clock

cy_en_sar_clock_source_t cy_stc_sar_config_t::clock

Clock source selection (enable/disable SAR operation in the Deep Sleep mode).

Ignored for PASS_ver1.

◆ fifoCfgPtr

cy_stc_sar_fifo_config_t const* cy_stc_sar_config_t::fifoCfgPtr

Pointer to the FIFO configuration structure cy_stc_sar_fifo_config_t, if NULL - the FIFO is not used.

Should be NULL for PASS_ver1.

◆ trTimer

bool cy_stc_sar_config_t::trTimer

SAR is being triggered from the Timer Timer .

Ignored for PASS_ver1.

◆ scanCnt

bool cy_stc_sar_config_t::scanCnt

Enable the scanning counter, configured by Cy_SAR_CommonInit.

Ignored for PASS_ver1.

◆ scanCntIntr

bool cy_stc_sar_config_t::scanCntIntr

EOS interrupt on scanning counter event.

Ignored for PASS_ver1.