CAPSENSE™ Middleware Library 5.0
cy_stc_capsense_common_context_t Struct Reference

Description

Declares top-level Context Data Structure.

Data Fields

uint16_t configId
 16-bit CRC calculated by the CAPSENSE™ Configurator tool for the CAPSENSE™ configuration. More...
 
uint16_t tunerCmd
 Tuner Command Register cy_en_capsense_tuner_cmd_t. More...
 
uint16_t scanCounter
 This counter increments after each scan of active widgets. More...
 
uint8_t tunerSt
 State of CAPSENSE™ middleware tuner module. More...
 
uint8_t initDone
 Keep information whether initialization was done or not.
 
volatile uint32_t status
 Middleware status information: More...
 
uint32_t timestampInterval
 Timestamp interval used at increasing the timestamp by Cy_CapSense_IncrementGestureTimestamp()
 
uint32_t timestamp
 Current timestamp should be kept updated and operational, which is vital for the operation of Gesture and Ballistic multiplier features.
 
uint8_t modCsdClk
 The modulator clock divider for the CSD widgets. More...
 
uint8_t modCsxClk
 The modulator clock divider for the CSX widgets. More...
 
uint8_t tunerCnt
 Command counter of CAPSENSE™ middleware tuner module.
 
uint16_t lpDataSt
 State of Low Power data processing: More...
 
uint8_t lpFirstSnsId
 The first scanned low power sensor within LP frame. More...
 
uint8_t lpSnsNumber
 The number of consecutive scanned low power sensors from the .lpFirstSnsID. More...
 
uint8_t lpNumFrame
 The number of fully scanned low power frames available in the packet. More...
 
uint8_t lpScanCounter
 This counter increments after each scan of low power widgets. More...
 
uint8_t lpScanSt
 The state / status of low power sensor baselines: More...
 

Field Documentation

◆ configId

uint16_t cy_stc_capsense_common_context_t::configId

16-bit CRC calculated by the CAPSENSE™ Configurator tool for the CAPSENSE™ configuration.

Used by the CAPSENSE™ Tuner tool to identify if the FW corresponds to the specific user configuration.

◆ tunerCmd

uint16_t cy_stc_capsense_common_context_t::tunerCmd

Tuner Command Register cy_en_capsense_tuner_cmd_t.

Used for the communication between the CAPSENSE™ Tuner tool and the middleware

◆ scanCounter

uint16_t cy_stc_capsense_common_context_t::scanCounter

This counter increments after each scan of active widgets.

◆ tunerSt

uint8_t cy_stc_capsense_common_context_t::tunerSt

State of CAPSENSE™ middleware tuner module.

cy_en_capsense_tuner_state_t

◆ status

volatile uint32_t cy_stc_capsense_common_context_t::status

Middleware status information:

  • Bit[0-3] - The set [x] bit of the result means that the previously initiated scan for the [x] channel is in progress. For MSCv3 each bit shows a busyness of a corresponding sensing channel. The next scan frame cannot be started (CY_CAPSENSE_BUSY_ALL_CH_MASK)
  • Bit[4] - The last or currently scanned widget type is Active widget (CY_CAPSENSE_MW_STATE_ACTIVE_WD_SCAN_MASK)
  • Bit[5] - The last or currently scanned widget type is Low Power widget (CY_CAPSENSE_MW_STATE_LP_WD_SCAN_MASK)
  • Bit[6] - Reserved
  • Bit[7] - The previously initiated scan is in progress (CY_CAPSENSE_BUSY)
  • Bit[8] - Reserved
  • Bit[9] - Reserved
  • Bit[10] - A touch is detected on any low power widget. The bit is automatically cleared when a new low power scan triggered (CY_CAPSENSE_MW_STATE_LP_ACTIVE_MASK)
  • Bit[11] - CapSense Middleware performs BIST functionality which might include multiple HW scanning and result processing (CY_CAPSENSE_MW_STATE_BIST_MASK)
  • Bit[12] - The auto-calibration in Single CDAC mode (CY_CAPSENSE_MW_STATE_CALIBRATION_SINGLE_MASK)
  • Bit[13] - The auto-calibration is in progress. The next scan frame cannot be started (CY_CAPSENSE_MW_STATE_CALIBRATION_MASK)
  • Bit[14] - The smart sensing algorithm is in progress. The next scan frame cannot be started (CY_CAPSENSE_MW_STATE_SMARTSENSE_MASK)
  • Bit[15] - Middleware initialization is in progress and the next scan frame cannot be initiated (CY_CAPSENSE_MW_STATE_INITIALIZATION_MASK)
  • Bit[16-31] - The set [x] number of the result means that the previously initiated scan for the [x] slot is completed or in progress. In CS-DMA mode, this field is set only for the first scanned slot (CY_CAPSENSE_MW_STATE_SCAN_SLOT_MASK[x])
    Note
    For the the forth-generation CAPSENSE™ only Bit[7] is available.

◆ modCsdClk

uint8_t cy_stc_capsense_common_context_t::modCsdClk

The modulator clock divider for the CSD widgets.

Note
This field is available only for the fourth-generation CAPSENSE™.

◆ modCsxClk

uint8_t cy_stc_capsense_common_context_t::modCsxClk

The modulator clock divider for the CSX widgets.

Note
This field is available only for the fourth-generation CAPSENSE™.

◆ lpDataSt

uint16_t cy_stc_capsense_common_context_t::lpDataSt

State of Low Power data processing:

  • Bit[0] = 0 (Default) - data is not copied and cannot be transmitted to Tuner
  • Bit[0] = 1 - data copied by CAPSENSE™ and transmitted to Tuner.
    Note
    This field is available only for the fifth-generation low power CAPSENSE™.

◆ lpFirstSnsId

uint8_t cy_stc_capsense_common_context_t::lpFirstSnsId

The first scanned low power sensor within LP frame.

Note
This field is available only for the fifth-generation low power CAPSENSE™.

◆ lpSnsNumber

uint8_t cy_stc_capsense_common_context_t::lpSnsNumber

The number of consecutive scanned low power sensors from the .lpFirstSnsID.

Note
This field is available only for the fifth-generation low power CAPSENSE™.

◆ lpNumFrame

uint8_t cy_stc_capsense_common_context_t::lpNumFrame

The number of fully scanned low power frames available in the packet.

Note
This field is available only for the fifth-generation low power CAPSENSE™.

◆ lpScanCounter

uint8_t cy_stc_capsense_common_context_t::lpScanCounter

This counter increments after each scan of low power widgets.

Note
This field is available only for the fifth-generation low power CAPSENSE™.

◆ lpScanSt

uint8_t cy_stc_capsense_common_context_t::lpScanSt

The state / status of low power sensor baselines:

  • Bit[0] = 0 - baseline reset: does not happen
  • Bit[0] = 1 - baseline reset: happen
  • Bit[1] = 0 - baseline is not valid due to FIFO overflow
  • Bit[1] = 1 - baseline is valid.
    Note
    This field is available only for the fifth-generation low power CAPSENSE™.