LESENSE_ChDesc_TypeDef Struct Reference

Channel descriptor structure.

#include <em_lesense.h>

Data Fields

bool enaScanCh
Set to enable scan channel CHx.
bool enaPin
Set to enable CHx pin.
bool enaInt
Enable/disable channel interrupts after configuring all the sensor channel parameters.
LESENSE_ChPinExMode_TypeDef chPinExMode
Configure channel pin mode for the excitation phase of the scan sequence.
LESENSE_ChPinIdleMode_TypeDef chPinIdleMode
Configure channel pin idle setup in LESENSE idle phase.
bool useAltEx
Set to use alternate excite pin for excitation.
bool shiftRes
Set to enable result from this channel being shifted into the decoder register.
bool invRes
Set to invert result bit stored in the SCANRES register.
bool storeCntRes
Set to store counter value in the RAM (accessible via RESDATA) and make the comparison result available in the SCANRES register.
LESENSE_ChClk_TypeDef exClk
Select clock used for the excitation timing.
LESENSE_ChClk_TypeDef sampleClk
Select clock used for the sample delay timing.
uint8_t exTime
Configure the excitation time.
uint8_t sampleDelay
Configure the sample delay.
uint16_t measDelay
Configure the measure delay.
uint16_t acmpThres
Configure the ACMP threshold or the DAC data.
LESENSE_ChSampleMode_TypeDef sampleMode
Select if the ACMP output, the ADC output or the counter output should be used in comparison.
LESENSE_ChIntMode_TypeDef intMode
Configure the interrupt generation mode for the CHx interrupt flag.
uint16_t cntThres
Configure the decision threshold for the sensor data comparison.
LESENSE_ChCompMode_TypeDef compMode
Select the mode for counter comparison.
LESENSE_ChEvalMode_TypeDef evalMode
Select the sensor evaluation mode.
uint8_t offset
Offset for IADC/ACMP interaction.

Channel descriptor structure.

Field Documentation

enaScanCh

bool LESENSE_ChDesc_TypeDef::enaScanCh

Set to enable scan channel CHx.

enaPin

bool LESENSE_ChDesc_TypeDef::enaPin

Set to enable CHx pin.

enaInt

bool LESENSE_ChDesc_TypeDef::enaInt

Enable/disable channel interrupts after configuring all the sensor channel parameters.

chPinExMode

LESENSE_ChPinExMode_TypeDef LESENSE_ChDesc_TypeDef::chPinExMode

Configure channel pin mode for the excitation phase of the scan sequence.

Note: OPAOUT is only available on channels 2, 3, 4, and 5.

chPinIdleMode

LESENSE_ChPinIdleMode_TypeDef LESENSE_ChDesc_TypeDef::chPinIdleMode

Configure channel pin idle setup in LESENSE idle phase.

useAltEx

bool LESENSE_ChDesc_TypeDef::useAltEx

Set to use alternate excite pin for excitation.

shiftRes

bool LESENSE_ChDesc_TypeDef::shiftRes

Set to enable result from this channel being shifted into the decoder register.

invRes

bool LESENSE_ChDesc_TypeDef::invRes

Set to invert result bit stored in the SCANRES register.

storeCntRes

bool LESENSE_ChDesc_TypeDef::storeCntRes

Set to store counter value in the RAM (accessible via RESDATA) and make the comparison result available in the SCANRES register.

exClk

LESENSE_ChClk_TypeDef LESENSE_ChDesc_TypeDef::exClk

Select clock used for the excitation timing.

sampleClk

LESENSE_ChClk_TypeDef LESENSE_ChDesc_TypeDef::sampleClk

Select clock used for the sample delay timing.

exTime

uint8_t LESENSE_ChDesc_TypeDef::exTime

Configure the excitation time.

Excitation will last exTime+1 excitation clock cycles. Valid range: 0-63 (6 bits).

sampleDelay

uint8_t LESENSE_ChDesc_TypeDef::sampleDelay

Configure the sample delay.

Sampling will occur after sampleDelay+1 sample clock cycles. Valid range: 0-127 (7 bits) or 0-255 (8 bits) depending on device.

measDelay

uint16_t LESENSE_ChDesc_TypeDef::measDelay

Configure the measure delay.

Sensor measuring is delayed for measDelay excitation clock cycles. Valid range: 0-127 (7 bits) or 0-1023 (10 bits) depending on device.

acmpThres

uint16_t LESENSE_ChDesc_TypeDef::acmpThres

Configure the ACMP threshold or the DAC data.

If perCtrl.dacCh0Data or perCtrl.dacCh1Data is set to lesenseDACIfData , acmpThres defines the 12-bit DAC data in the corresponding data register of DAC interface (DACn_CH0DATA and DACn_CH1DATA). In this case, the valid range is: 0-4095 (12 bits). If perCtrl.dacCh0Data or perCtrl.dacCh1Data is set to lesenseACMPThres, acmpThres defines the 6-bit Vdd scaling factor of ACMP negative input (VDDLEVEL in ACMP_INPUTSEL register). In this case, the valid range is: 0-63 (6 bits).

sampleMode

LESENSE_ChSampleMode_TypeDef LESENSE_ChDesc_TypeDef::sampleMode

Select if the ACMP output, the ADC output or the counter output should be used in comparison.

intMode

LESENSE_ChIntMode_TypeDef LESENSE_ChDesc_TypeDef::intMode

Configure the interrupt generation mode for the CHx interrupt flag.

cntThres

uint16_t LESENSE_ChDesc_TypeDef::cntThres

Configure the decision threshold for the sensor data comparison.

Valid range: 0-65535 (16 bits).

compMode

LESENSE_ChCompMode_TypeDef LESENSE_ChDesc_TypeDef::compMode

Select the mode for counter comparison.

evalMode

LESENSE_ChEvalMode_TypeDef LESENSE_ChDesc_TypeDef::evalMode

Select the sensor evaluation mode.

offset

uint8_t LESENSE_ChDesc_TypeDef::offset

Offset for IADC/ACMP interaction.

ACMP: offset determines which of the port I/O pins on the external override interface to access. IADC: offset determines which of the IADC scanner channels is sampled.