This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

64-Button Capacitive Touch with CapTIvate

in TI's reference design (64-Button Capacitive Touch with CapTIvate),it demonstrate that  every touch pad can be used to active the system,

and it need two separate projects designed by CapTivate design Center to gernerate source code, 

but  how can i combine two project source code  generated by the CapTivate design Center?



  • In the NOTE above (found on page 11 in the Design Guide), it mentions that the CapTIvate Design Center can only be used to view sensor data for one configuration at a time (either wake-on-touch mode or standard mode). Thus, two separate projects for these modes are needed when using the Design Center. When you're not using the Design Center, both modes can be implemented in a single project for your application.

    Regards,

    James

    MSP Customer Applications

  • yes i have done that , after combine two project together ,it can not enter low power mode,

    i modified the CAPT_App.c and  CAPT_UserConfig.c  as the file attached bellow:

    am i right ,

    is there any user guid that i can do it step by step?

    CAPT_UserConfig.c
    /* --COPYRIGHT--,BSD
     * Copyright (c) 2016, Texas Instruments Incorporated
     * All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     * *  Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     * *  Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the distribution.
     *
     * *  Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     * --/COPYRIGHT--*/
    
    
    // Generated by Captivate Design Center v1_20_00_01 on Tue Aug 23 19:44:15 CST 2016
    
    
    //*****************************************************************************
    // CAPT_UserConfig.c
    //
    // \version 1.03.02.00
    // Released on Wed, Feb 24, 2016  2:01:17 PM
    //
    //*****************************************************************************
    
    //*****************************************************************************
    //
    // NOTE: This is an automatically generated source code file!  The Captivate
    // Design Center generates the User Configuration file automatically based
    // upon the sensor layout that was created.
    //
    // Changes to this file will be OVERWRITTEN if a you select
    // "Update Existing Project" under "Generate Source Code" in the Design Center.
    //
    // To avoid interference with the code generation process, keep ALL application
    // code external to this file.
    //
    //*****************************************************************************
    
    #include "CAPT_UserConfig.h"
    
    //*****************************************************************************
    //
    //! Captivate Element Definitions
    //! All elements in this application are defined below.
    //! Each element has 3 components:
    //!  1) a raw count array (One index per freq. scanned) (uint16_t)
    //!  2) a tuning array (One index per freq. scanned) (tCaptivateElementTuning)
    //!  3) a element structure (tElement)
    //
    //*****************************************************************************
    // Sensor: LOCK_BUTTON_Active, Element: E00
    uint16_t LOCK_BUTTON_Active_E00_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning LOCK_BUTTON_Active_E00_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement LOCK_BUTTON_Active_E00 =
    {
        .ui8TxPin = 0,
        .ui8TxBlock = 0,
        .ui8RxPin = 1,
        .ui8RxBlock = 1,
        .ui8TouchThreshold = 10,
        .pRawCount = LOCK_BUTTON_Active_E00_RawCnts,
        .pTuning = LOCK_BUTTON_Active_E00_Tuning,
    };
    
    // Sensor: LOCK_BUTTON_Active, Element: E01
    uint16_t LOCK_BUTTON_Active_E01_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning LOCK_BUTTON_Active_E01_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement LOCK_BUTTON_Active_E01 =
    {
        .ui8TxPin = 0,
        .ui8TxBlock = 0,
        .ui8RxPin = 1,
        .ui8RxBlock = 2,
        .ui8TouchThreshold = 10,
        .pRawCount = LOCK_BUTTON_Active_E01_RawCnts,
        .pTuning = LOCK_BUTTON_Active_E01_Tuning,
    };
    
    // Sensor: LOCK_BUTTON_Active, Element: E02
    uint16_t LOCK_BUTTON_Active_E02_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning LOCK_BUTTON_Active_E02_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement LOCK_BUTTON_Active_E02 =
    {
        .ui8TxPin = 0,
        .ui8TxBlock = 0,
        .ui8RxPin = 1,
        .ui8RxBlock = 3,
        .ui8TouchThreshold = 10,
        .pRawCount = LOCK_BUTTON_Active_E02_RawCnts,
        .pTuning = LOCK_BUTTON_Active_E02_Tuning,
    };
    
    // Sensor: LOCK_BUTTON_Active, Element: E03
    uint16_t LOCK_BUTTON_Active_E03_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning LOCK_BUTTON_Active_E03_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement LOCK_BUTTON_Active_E03 =
    {
        .ui8TxPin = 1,
        .ui8TxBlock = 0,
        .ui8RxPin = 1,
        .ui8RxBlock = 1,
        .ui8TouchThreshold = 10,
        .pRawCount = LOCK_BUTTON_Active_E03_RawCnts,
        .pTuning = LOCK_BUTTON_Active_E03_Tuning,
    };
    
    // Sensor: LOCK_BUTTON_Active, Element: E04
    uint16_t LOCK_BUTTON_Active_E04_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning LOCK_BUTTON_Active_E04_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement LOCK_BUTTON_Active_E04 =
    {
        .ui8TxPin = 1,
        .ui8TxBlock = 0,
        .ui8RxPin = 1,
        .ui8RxBlock = 2,
        .ui8TouchThreshold = 10,
        .pRawCount = LOCK_BUTTON_Active_E04_RawCnts,
        .pTuning = LOCK_BUTTON_Active_E04_Tuning,
    };
    
    // Sensor: LOCK_BUTTON_Active, Element: E05
    uint16_t LOCK_BUTTON_Active_E05_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning LOCK_BUTTON_Active_E05_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement LOCK_BUTTON_Active_E05 =
    {
        .ui8TxPin = 1,
        .ui8TxBlock = 0,
        .ui8RxPin = 1,
        .ui8RxBlock = 3,
        .ui8TouchThreshold = 10,
        .pRawCount = LOCK_BUTTON_Active_E05_RawCnts,
        .pTuning = LOCK_BUTTON_Active_E05_Tuning,
    };
    
    // Sensor: LOCK_BUTTON_Active, Element: E06
    uint16_t LOCK_BUTTON_Active_E06_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning LOCK_BUTTON_Active_E06_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement LOCK_BUTTON_Active_E06 =
    {
        .ui8TxPin = 2,
        .ui8TxBlock = 0,
        .ui8RxPin = 1,
        .ui8RxBlock = 1,
        .ui8TouchThreshold = 10,
        .pRawCount = LOCK_BUTTON_Active_E06_RawCnts,
        .pTuning = LOCK_BUTTON_Active_E06_Tuning,
    };
    
    // Sensor: LOCK_BUTTON_Active, Element: E07
    uint16_t LOCK_BUTTON_Active_E07_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning LOCK_BUTTON_Active_E07_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement LOCK_BUTTON_Active_E07 =
    {
        .ui8TxPin = 2,
        .ui8TxBlock = 0,
        .ui8RxPin = 1,
        .ui8RxBlock = 2,
        .ui8TouchThreshold = 10,
        .pRawCount = LOCK_BUTTON_Active_E07_RawCnts,
        .pTuning = LOCK_BUTTON_Active_E07_Tuning,
    };
    
    // Sensor: LOCK_BUTTON_Active, Element: E08
    uint16_t LOCK_BUTTON_Active_E08_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning LOCK_BUTTON_Active_E08_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement LOCK_BUTTON_Active_E08 =
    {
        .ui8TxPin = 2,
        .ui8TxBlock = 0,
        .ui8RxPin = 1,
        .ui8RxBlock = 3,
        .ui8TouchThreshold = 10,
        .pRawCount = LOCK_BUTTON_Active_E08_RawCnts,
        .pTuning = LOCK_BUTTON_Active_E08_Tuning,
    };
    
    // Sensor: LOCK_BUTTON_Active, Element: E09
    uint16_t LOCK_BUTTON_Active_E09_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning LOCK_BUTTON_Active_E09_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement LOCK_BUTTON_Active_E09 =
    {
        .ui8TxPin = 3,
        .ui8TxBlock = 0,
        .ui8RxPin = 1,
        .ui8RxBlock = 1,
        .ui8TouchThreshold = 10,
        .pRawCount = LOCK_BUTTON_Active_E09_RawCnts,
        .pTuning = LOCK_BUTTON_Active_E09_Tuning,
    };
    
    // Sensor: LOCK_BUTTON_Active, Element: E10
    uint16_t LOCK_BUTTON_Active_E10_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning LOCK_BUTTON_Active_E10_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement LOCK_BUTTON_Active_E10 =
    {
        .ui8TxPin = 3,
        .ui8TxBlock = 0,
        .ui8RxPin = 1,
        .ui8RxBlock = 2,
        .ui8TouchThreshold = 10,
        .pRawCount = LOCK_BUTTON_Active_E10_RawCnts,
        .pTuning = LOCK_BUTTON_Active_E10_Tuning,
    };
    
    // Sensor: LOCK_BUTTON_Active, Element: E11
    uint16_t LOCK_BUTTON_Active_E11_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning LOCK_BUTTON_Active_E11_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement LOCK_BUTTON_Active_E11 =
    {
        .ui8TxPin = 3,
        .ui8TxBlock = 0,
        .ui8RxPin = 1,
        .ui8RxBlock = 3,
        .ui8TouchThreshold = 10,
        .pRawCount = LOCK_BUTTON_Active_E11_RawCnts,
        .pTuning = LOCK_BUTTON_Active_E11_Tuning,
    };
    
    
    
    
    
    //*****************************************************************************
    //
    //! Captivate Time Cycle Definitions
    //! All time cycles in this application are defined below.  Time cycles are
    //! groups of elements that are measured together in parallel in one time slot.
    //! Each cycle has 2 components:
    //!  1) an element pointer array to the member elements (tElement*)
    //!  2) a cycle structure (tCycle)
    //
    //*****************************************************************************
    // Time Cycle: LOCK_BUTTON_Active_C00
    tElement* LOCK_BUTTON_Active_C00_Elements[3] =
    {
        &LOCK_BUTTON_Active_E00,
        &LOCK_BUTTON_Active_E01,
        &LOCK_BUTTON_Active_E02,
    };
    tCycle LOCK_BUTTON_Active_C00 =
    {
        .ui8NrOfElements = 3,
        .pElements = LOCK_BUTTON_Active_C00_Elements,
    };
    
    // Time Cycle: LOCK_BUTTON_Active_C01
    tElement* LOCK_BUTTON_Active_C01_Elements[3] =
    {
        &LOCK_BUTTON_Active_E03,
        &LOCK_BUTTON_Active_E04,
        &LOCK_BUTTON_Active_E05,
    };
    tCycle LOCK_BUTTON_Active_C01 =
    {
        .ui8NrOfElements = 3,
        .pElements = LOCK_BUTTON_Active_C01_Elements,
    };
    
    // Time Cycle: LOCK_BUTTON_Active_C02
    tElement* LOCK_BUTTON_Active_C02_Elements[3] =
    {
        &LOCK_BUTTON_Active_E06,
        &LOCK_BUTTON_Active_E07,
        &LOCK_BUTTON_Active_E08,
    };
    tCycle LOCK_BUTTON_Active_C02 =
    {
        .ui8NrOfElements = 3,
        .pElements = LOCK_BUTTON_Active_C02_Elements,
    };
    
    // Time Cycle: LOCK_BUTTON_Active_C03
    tElement* LOCK_BUTTON_Active_C03_Elements[3] =
    {
        &LOCK_BUTTON_Active_E09,
        &LOCK_BUTTON_Active_E10,
        &LOCK_BUTTON_Active_E11,
    };
    tCycle LOCK_BUTTON_Active_C03 =
    {
        .ui8NrOfElements = 3,
        .pElements = LOCK_BUTTON_Active_C03_Elements,
    };
    
    
    
    //*****************************************************************************
    //
    //! Captivate Sensor Definitions
    //! All sensors in this application are defined below.  Sensors are
    //! groups of time cycles that utilize raw measurement data to create an
    //! abstract sensor type, such as a button, slider, wheel, or prox sensor.
    //! Each sensor has 3 components:
    //!  1) a cycle pointer array to the member time cycles (tCycle*)
    //!  2) a sensor-specific parameter structure (tGenericSensorParams)
    //!  3) a sensor structure (tSensor)
    //
    //*****************************************************************************
    //Sensor: LOCK_BUTTON_Active
    const tCycle* LOCK_BUTTON_Active_Cycles[4] =
    {
        &LOCK_BUTTON_Active_C00,
        &LOCK_BUTTON_Active_C01,
        &LOCK_BUTTON_Active_C02,
        &LOCK_BUTTON_Active_C03,
    };
    
    tButtonSensorParams LOCK_BUTTON_Active_Params;
    tSensor LOCK_BUTTON_Active =
    {
        // Basic Properties
        .TypeOfSensor = eButtonGroup,
        .SensingMethod = eProjected,
        .DirectionOfInterest = eDOIUp,
        .pvCallback = NULL,
        .ui8NrOfCycles = 4,
        .pCycle = LOCK_BUTTON_Active_Cycles,
        .pSensorParams = (tGenericSensorParams*)&LOCK_BUTTON_Active_Params,
        // Conversion Control Parameters
        .ui16ConversionCount = 500,
        .ui16ConversionGain = 200,
        .ui8FreqDiv = 2,
        .ui8ChargeLength = 0,
        .ui8TransferLength = 0,
        .bModEnable = false,
        .ui8BiasControl = 3,
        .bCsDischarge = true,
        .bLpmControl = false,
        .ui8InputSyncControl = 0,
        .bTimerSyncControl = false,
        .bIdleState = true,
        // Tuning  Parameters
        .ui16ProxThreshold = 10,
        .ui16NegativeTouchThreshold = 20,
        .ui16ErrorThreshold = 8191,
        .ui16TimeoutThreshold = 200,
        .ProxDbThreshold.DbIn = 1,
        .ProxDbThreshold.DbOut = 0,
        .TouchDbThreshold.DbIn = 1,
        .TouchDbThreshold.DbOut = 0,
        .bCountFilterEnable = true,
        .ui8CntBeta = 1,
        .bSensorHalt = false,
        .bPTSensorHalt = true,
        .bPTElementHalt = true,
        .ui8LTABeta = 7,
        .bReCalibrateEnable = true,
    };
    
    //*****************************************************************************
    // Sensor: LOCK_BUTTON_wot, Element: E00
    uint16_t LOCK_BUTTON_wot_E00_RawCnts[CAPT_SELF_FREQ_CNT];
    tCaptivateElementTuning LOCK_BUTTON_wot_E00_Tuning[CAPT_SELF_FREQ_CNT];
    tElement LOCK_BUTTON_wot_E00 =
    {
        .ui8RxPin = 1,
        .ui8RxBlock = 1,
        .ui8TouchThreshold = 10,
        .pRawCount = LOCK_BUTTON_wot_E00_RawCnts,
        .pTuning = LOCK_BUTTON_wot_E00_Tuning,
    };
    
    // Sensor: LOCK_BUTTON_wot, Element: E01
    uint16_t LOCK_BUTTON_wot_E01_RawCnts[CAPT_SELF_FREQ_CNT];
    tCaptivateElementTuning LOCK_BUTTON_wot_E01_Tuning[CAPT_SELF_FREQ_CNT];
    tElement LOCK_BUTTON_wot_E01 =
    {
        .ui8RxPin = 1,
        .ui8RxBlock = 2,
        .ui8TouchThreshold = 10,
        .pRawCount = LOCK_BUTTON_wot_E01_RawCnts,
        .pTuning = LOCK_BUTTON_wot_E01_Tuning,
    };
    
    // Sensor: LOCK_BUTTON_wot, Element: E02
    uint16_t LOCK_BUTTON_wot_E02_RawCnts[CAPT_SELF_FREQ_CNT];
    tCaptivateElementTuning LOCK_BUTTON_wot_E02_Tuning[CAPT_SELF_FREQ_CNT];
    tElement LOCK_BUTTON_wot_E02 =
    {
        .ui8RxPin = 1,
        .ui8RxBlock = 3,
        .ui8TouchThreshold = 10,
        .pRawCount = LOCK_BUTTON_wot_E02_RawCnts,
        .pTuning = LOCK_BUTTON_wot_E02_Tuning,
    };
    
    
    //*****************************************************************************
    //
    //! Captivate Time Cycle Definitions
    //! All time cycles in this application are defined below.  Time cycles are
    //! groups of elements that are measured together in parallel in one time slot.
    //! Each cycle has 2 components:
    //!  1) an element pointer array to the member elements (tElement*)
    //!  2) a cycle structure (tCycle)
    //
    //*****************************************************************************
    // Time Cycle: LOCK_BUTTON_wot_C00
    tElement* LOCK_BUTTON_wot_C00_Elements[3] =
    {
        &LOCK_BUTTON_wot_E00,
        &LOCK_BUTTON_wot_E01,
        &LOCK_BUTTON_wot_E02,
    };
    tCycle LOCK_BUTTON_wot_C00 =
    {
        .ui8NrOfElements = 3,
        .pElements = LOCK_BUTTON_wot_C00_Elements,
    };
    
    
    //*****************************************************************************
    //
    //! Captivate Sensor Definitions
    //! All sensors in this application are defined below.  Sensors are
    //! groups of time cycles that utilize raw measurement data to create an
    //! abstract sensor type, such as a button, slider, wheel, or prox sensor.
    //! Each sensor has 3 components:
    //!  1) a cycle pointer array to the member time cycles (tCycle*)
    //!  2) a sensor-specific parameter structure (tGenericSensorParams)
    //!  3) a sensor structure (tSensor)
    //
    //*****************************************************************************
    //Sensor: LOCK_BUTTON_wot
    const tCycle* LOCK_BUTTON_wot_Cycles[1] =
    {
        &LOCK_BUTTON_wot_C00,
    };
    
    tButtonSensorParams LOCK_BUTTON_wot_Params;
    tSensor LOCK_BUTTON_wot =
    {
        // Basic Properties
        .TypeOfSensor = eButtonGroup,
        .SensingMethod = eSelf,
        .DirectionOfInterest = eDOIDown,
        .pvCallback = NULL,
        .ui8NrOfCycles = 1,
        .pCycle = LOCK_BUTTON_wot_Cycles,
        .pSensorParams = (tGenericSensorParams*)&LOCK_BUTTON_wot_Params,
        // Conversion Control Parameters
        .ui16ConversionCount = 600,
        .ui16ConversionGain = 200,
        .ui8FreqDiv = 2,
        .ui8ChargeLength = 0,
        .ui8TransferLength = 0,
        .bModEnable = false,
        .ui8BiasControl = 3,
        .bCsDischarge = true,
        .bLpmControl = false,
        .ui8InputSyncControl = 0,
        .bTimerSyncControl = false,
        .bIdleState = true,
        // Tuning  Parameters
        .ui16ProxThreshold = 10,
        .ui16NegativeTouchThreshold = 20,
        .ui16ErrorThreshold = 8191,
        .ui16TimeoutThreshold = 1000,
        .ProxDbThreshold.DbIn = 1,
        .ProxDbThreshold.DbOut = 0,
        .TouchDbThreshold.DbIn = 1,
        .TouchDbThreshold.DbOut = 0,
        .bCountFilterEnable = true,
        .ui8CntBeta = 1,
        .bSensorHalt = false,
        .bPTSensorHalt = true,
        .bPTElementHalt = true,
        .ui8LTABeta = 7,
        .bReCalibrateEnable = true,
    };
    
    
    #if (CAPT_CONDUCTED_NOISE_IMMUNITY_ENABLE==true)
    //*****************************************************************************
    //
    //! \var g_EMCConfig
    //! This structure stores the EMC configuration for this application.
    //
    //*****************************************************************************
    const tEMCConfig g_EMCConfig =
    {
    	// Conversion Style
    	.selfModeConversionStyle = eMultiFrequency,
    	.projModeConversionStyle = eMultiFrequencyWithOutlierRemoval,
    	
    	// Oversampling Style
    	.selfModeOversamplingStyle = eNoOversampling,
    	.projModeOversamplingStyle = eNoOversampling,
    	
    	// Jitter Filter Enable
    	.bJitterFilterEnable = true,
    	
    	// Noise Thresholds and Calibration Noise Limits
    	.ui8NoiseThreshold = 20,
    	.ui16CalibrationNoiseLimit = 10,
    	.ui8CalibrationTestSampleSize = 8,
    		
    	// Dynamic Threshold Adjustment Parameters
    	.bEnableDynamicThresholdAdjustment = true,
    	.ui8MaxRelThreshAdj = 76,
    	.ui8NoiseLevelFilterEntryThresh = 40,
    	.ui8NoiseLevelFilterExitThresh = 0,
    	.ui8NoiseLevelFilterDown = 6,
    	.ui8NoiseLevelFilterUp = 1,
    	.coeffA = _IQ31(0.0065),
    	.coeffB = _IQ31(0.050)
    };
    #endif
    
    //*****************************************************************************
    //
    //! \var g_pCaptivateSensorArray
    //! This array allows for indexed access to any
    //! sensor in the configuration.
    //
    //*****************************************************************************
    tSensor* g_pCaptivateSensorArray[CAPT_SENSOR_COUNT] =
    {
        &LOCK_BUTTON_Active,
        //&LOCK_BUTTON_wot,
    };
    
    
    //*****************************************************************************
    //
    //! \var g_uiApp
    //! This structure stores the global settings for this application.
    //
    //*****************************************************************************
    tCaptivateApplication g_uiApp =
    {
        .state = eUIActive,
    	.pSensorList = &g_pCaptivateSensorArray[0],
        .ui8NrOfSensors = CAPT_SENSOR_COUNT,
        .ui8AppLPM = LPM3_bits,
        .bElementDataTxEnable = false,
        .bSensorDataTxEnable = false,
        .ui16ActiveModeScanPeriod = 33,
        .ui16WakeOnProxModeScanPeriod = 100,
        .ui16InactivityTimeout = 50,
        .ui8WakeupInterval = 5,
    };
    

  • Thank you for sharing your configuration file.  First, I would recommend that you change the configuration so that you have 3 cycles of 4 measurements instead of 4 cycles of 3 measurements.  This would mean using block 0 as an Rx.  Second, you are not using all of the available GPIO so creating a WOT sensor is much simpler than in the case where one of the sensors consumes all 16 capTIvate IO.

    Once you have generated the code, then you will need to update the CAPT_App.c file to support the incorporation of the BTN00 sensor with the BTN01.

    Taken from the CapTIvate 64 button example:

     

    ….

                   // Initialize Wake On Touch sensor structure, configure IOs for wake on touch,

                   // calibrate for wake on touch mode, and update sensor to establish LTA

                   MAP_CAPT_forceSensorIO(eSelf, &BTN00);

                   CAPT_initSensor(&BTN01);

                   CAPT_calibrateSensor(&BTN01);

                   CAPT_updateSensor(&BTN01, LPM3_bits);

     

    ….

     

                                                                               // Initialize wake on touch structure, configure IOs for wake on touch

                                                                               MAP_CAPT_forceSensorIO(eSelf, &BTN00);

                                                                               CAPT_initSensor(&BTN01);

     

                                                                               CAPT_startWakeOnProxMode(

                                                                                                             &CAPT_WAKEONPROX_SENSOR,

                                                                                                             0,

                                                                                                             g_uiApp.ui8WakeupInterval

                                                                                              );

    ….

    Let me know if you have additional questions and I will work with the team to provide a step-by-step process.

    Regards,

    Chris

**Attention** This is a public forum