MTB CAT1 Peripheral driver library
cy_stc_sar2_channel_config_t Struct Reference

Description

Configuration structure of the SAR2 ADC channel.

Data Fields

bool channelHwEnable
 If HW is started, or just configured. More...
 
cy_en_sar2_trigger_selection_t triggerSelection
 The ADC trigger mode selection, see cy_en_sar2_trigger_selection_t.
 
uint8_t channelPriority
 Channel priority. More...
 
cy_en_sar2_preemption_type_t preenptionType
 The ADC preemption type selection, see cy_en_sar2_preemption_type_t.
 
bool isGroupEnd
 This value indicates that this channel is the last channel of a group or not.
 
cy_en_sar2_done_level_t doneLevel
 Conversion done, trigger output selection, see cy_en_sar2_done_level_t.
 
cy_en_sar2_pin_address_t pinAddress
 The address of the analog signal (pin) to be sampled by a corresponding channel, see cy_en_sar2_pin_address_t.
 
cy_en_sar2_port_address_t portAddress
 Select the physical port, see cy_en_sar2_port_address_t.
 
uint8_t extMuxSelect
 External analog mux selection. More...
 
bool extMuxEnable
 External analog mux enable. More...
 
cy_en_sar2_precondition_mode_t preconditionMode
 Select Preconditioning mode, see cy_en_sar2_precondition_mode_t.
 
cy_en_sar2_overlap_diag_mode_t overlapDiagMode
 Select Overlap mode or SARMUX Diagnostics, see cy_en_sar2_overlap_diag_mode_t.
 
uint16_t sampleTime
 Sample time (aperture) in ADC clock cycles. More...
 
cy_en_sar2_calibration_value_select_t calibrationValueSelect
 Select calibration values, see cy_en_sar2_calibration_value_select_t.
 
cy_en_sar2_result_alignment_t resultAlignment
 Select the result data alignment, see cy_en_sar2_result_alignment_t.
 
cy_en_sar2_sign_extention_t signExtention
 Select whether the result data is signed or unsigned, see cy_en_sar2_sign_extention_t.
 
cy_en_sar2_post_processing_mode_t postProcessingMode
 Select Post processing mode == , see cy_en_sar2_post_processing_mode_t.
 
uint16_t averageCount
 Averaging count. More...
 
uint8_t rightShift
 Shift Right. More...
 
uint16_t positiveReload
 Positive pulse reload value. More...
 
uint8_t negativeReload
 Negative pulse reload value. More...
 
cy_en_sar2_range_detection_mode_t rangeDetectionMode
 Select Range detection mode, see cy_en_sar2_range_detection_mode_t.
 
uint16_t rangeDetectionLoThreshold
 Range detect low threshold (Lo)
 
uint16_t rangeDetectionHiThreshold
 Range detect high threshold (Hi)
 
uint32_t interruptMask
 Select the interrupt sources. More...
 

Field Documentation

◆ channelHwEnable

bool cy_stc_sar2_channel_config_t::channelHwEnable

If HW is started, or just configured.

◆ channelPriority

uint8_t cy_stc_sar2_channel_config_t::channelPriority

Channel priority.

0=highest, 7=lowest.

◆ extMuxSelect

uint8_t cy_stc_sar2_channel_config_t::extMuxSelect

External analog mux selection.

◆ extMuxEnable

bool cy_stc_sar2_channel_config_t::extMuxEnable

External analog mux enable.

◆ sampleTime

uint16_t cy_stc_sar2_channel_config_t::sampleTime

Sample time (aperture) in ADC clock cycles.

The minimum is 1 (0 gives the same result as 1), the minimum time needed for the proper settling is at least 300ns, i.e. 6 clock cycles at the max frequency of 20MHz.

◆ averageCount

uint16_t cy_stc_sar2_channel_config_t::averageCount

Averaging count.

Active only if post processing mode is set to Averaging or Averaging + Range detect. The valid range is [1..256]

◆ rightShift

uint8_t cy_stc_sar2_channel_config_t::rightShift

Shift Right.

When using post processing mode with averaging, the set value is used for the right-shift value of the conversion result. Averaging data may be over 12 bits, therefore the user must ensure the conversion result is not to over 12 bits by using this value. This value is also used to fit the 12-bit result in 8 bits. The valid range is [0..15]

◆ positiveReload

uint16_t cy_stc_sar2_channel_config_t::positiveReload

Positive pulse reload value.

Active only if post processing is set to the Pulse detection. The valid range is [0..255].

◆ negativeReload

uint8_t cy_stc_sar2_channel_config_t::negativeReload

Negative pulse reload value.

Active only if post processing is set to the Pulse detection. The valid range is [0..31].

◆ interruptMask

uint32_t cy_stc_sar2_channel_config_t::interruptMask

Select the interrupt sources.

See Interrupt Masks