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.

MSP430FR2633: Captivate Design Center generated project

Part Number: MSP430FR2633

Captivate team,

I designed (mostly copied!) a 16 button mutual capacitance board (4 x 4) based on the 64 button TIDA ref design.  I had the PCB made and am now testing. When I generate my 16 button project with the Captivate Design Center and load it on the EVM (connected to 16 button board), I see no signal on the TX pins when probing with a scope. I also see no signal on the RX pins.

When I load the EVM with the 64 button project, I see an oscillating digital signal on the TX pins.

I assume there must be something I am doing differently in my Captivate Design Center project, but I can’t find the difference. I compared the captivate_config files and the captivate_app files. The only differences I can find are in captivate_config. Should I be looking at some other files in the project?

Any other suggestions?

Thanks,
Darren

  • Hi Darren,

    How do you configure the TX and RX pins, the configuration should be aligned with PCB layout.

    Ling

  • Hi Ling,

    I'll paste my generated code below.  I'm expecting my first button to use TX pin CAP1.2 (connector C7) and RX pin CAP1.0 (connector C5).

    It looks like it lines up to me, but I must be missing something.  I probed every pin on the connector, and I don't see a TX signal anywhere.

    Thanks,

    Darren 

    /* --COPYRIGHT--,BSD
    * Copyright (c) 2017, 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_81_00_09 on Wed Sep 11 23:06:34 EDT 2019


    //*****************************************************************************
    // CAPT_UserConfig.c
    //
    // \version 1.81.00.07
    // Released on August 13, 2019
    //
    //*****************************************************************************

    //*****************************************************************************
    //
    // 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: BTN00, Element: E00
    uint16_t BTN00_E00_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning BTN00_E00_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement BTN00_E00 =
    {
    .ui8TxPin = 2,
    .ui8TxBlock = 1,
    .ui8RxPin = 0,
    .ui8RxBlock = 1,
    .ui8TouchThreshold = 10,
    .pRawCount = BTN00_E00_RawCnts,
    .pTuning = BTN00_E00_Tuning,
    };

    // Sensor: BTN00, Element: E02
    uint16_t BTN00_E02_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning BTN00_E02_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement BTN00_E02 =
    {
    .ui8TxPin = 2,
    .ui8TxBlock = 1,
    .ui8RxPin = 0,
    .ui8RxBlock = 2,
    .ui8TouchThreshold = 10,
    .pRawCount = BTN00_E02_RawCnts,
    .pTuning = BTN00_E02_Tuning,
    };

    // Sensor: BTN00, Element: E01
    uint16_t BTN00_E01_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning BTN00_E01_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement BTN00_E01 =
    {
    .ui8TxPin = 2,
    .ui8TxBlock = 1,
    .ui8RxPin = 1,
    .ui8RxBlock = 1,
    .ui8TouchThreshold = 10,
    .pRawCount = BTN00_E01_RawCnts,
    .pTuning = BTN00_E01_Tuning,
    };

    // Sensor: BTN00, Element: E03
    uint16_t BTN00_E03_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning BTN00_E03_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement BTN00_E03 =
    {
    .ui8TxPin = 2,
    .ui8TxBlock = 1,
    .ui8RxPin = 1,
    .ui8RxBlock = 2,
    .ui8TouchThreshold = 10,
    .pRawCount = BTN00_E03_RawCnts,
    .pTuning = BTN00_E03_Tuning,
    };

    // Sensor: BTN00, Element: E04
    uint16_t BTN00_E04_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning BTN00_E04_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement BTN00_E04 =
    {
    .ui8TxPin = 3,
    .ui8TxBlock = 1,
    .ui8RxPin = 0,
    .ui8RxBlock = 1,
    .ui8TouchThreshold = 10,
    .pRawCount = BTN00_E04_RawCnts,
    .pTuning = BTN00_E04_Tuning,
    };

    // Sensor: BTN00, Element: E06
    uint16_t BTN00_E06_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning BTN00_E06_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement BTN00_E06 =
    {
    .ui8TxPin = 3,
    .ui8TxBlock = 1,
    .ui8RxPin = 0,
    .ui8RxBlock = 2,
    .ui8TouchThreshold = 10,
    .pRawCount = BTN00_E06_RawCnts,
    .pTuning = BTN00_E06_Tuning,
    };

    // Sensor: BTN00, Element: E05
    uint16_t BTN00_E05_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning BTN00_E05_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement BTN00_E05 =
    {
    .ui8TxPin = 3,
    .ui8TxBlock = 1,
    .ui8RxPin = 1,
    .ui8RxBlock = 1,
    .ui8TouchThreshold = 10,
    .pRawCount = BTN00_E05_RawCnts,
    .pTuning = BTN00_E05_Tuning,
    };

    // Sensor: BTN00, Element: E07
    uint16_t BTN00_E07_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning BTN00_E07_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement BTN00_E07 =
    {
    .ui8TxPin = 3,
    .ui8TxBlock = 1,
    .ui8RxPin = 1,
    .ui8RxBlock = 2,
    .ui8TouchThreshold = 10,
    .pRawCount = BTN00_E07_RawCnts,
    .pTuning = BTN00_E07_Tuning,
    };

    // Sensor: BTN00, Element: E08
    uint16_t BTN00_E08_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning BTN00_E08_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement BTN00_E08 =
    {
    .ui8TxPin = 2,
    .ui8TxBlock = 2,
    .ui8RxPin = 0,
    .ui8RxBlock = 1,
    .ui8TouchThreshold = 10,
    .pRawCount = BTN00_E08_RawCnts,
    .pTuning = BTN00_E08_Tuning,
    };

    // Sensor: BTN00, Element: E10
    uint16_t BTN00_E10_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning BTN00_E10_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement BTN00_E10 =
    {
    .ui8TxPin = 2,
    .ui8TxBlock = 2,
    .ui8RxPin = 0,
    .ui8RxBlock = 2,
    .ui8TouchThreshold = 10,
    .pRawCount = BTN00_E10_RawCnts,
    .pTuning = BTN00_E10_Tuning,
    };

    // Sensor: BTN00, Element: E09
    uint16_t BTN00_E09_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning BTN00_E09_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement BTN00_E09 =
    {
    .ui8TxPin = 2,
    .ui8TxBlock = 2,
    .ui8RxPin = 1,
    .ui8RxBlock = 1,
    .ui8TouchThreshold = 10,
    .pRawCount = BTN00_E09_RawCnts,
    .pTuning = BTN00_E09_Tuning,
    };

    // Sensor: BTN00, Element: E11
    uint16_t BTN00_E11_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning BTN00_E11_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement BTN00_E11 =
    {
    .ui8TxPin = 2,
    .ui8TxBlock = 2,
    .ui8RxPin = 1,
    .ui8RxBlock = 2,
    .ui8TouchThreshold = 10,
    .pRawCount = BTN00_E11_RawCnts,
    .pTuning = BTN00_E11_Tuning,
    };

    // Sensor: BTN00, Element: E12
    uint16_t BTN00_E12_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning BTN00_E12_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement BTN00_E12 =
    {
    .ui8TxPin = 3,
    .ui8TxBlock = 2,
    .ui8RxPin = 0,
    .ui8RxBlock = 1,
    .ui8TouchThreshold = 10,
    .pRawCount = BTN00_E12_RawCnts,
    .pTuning = BTN00_E12_Tuning,
    };

    // Sensor: BTN00, Element: E14
    uint16_t BTN00_E14_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning BTN00_E14_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement BTN00_E14 =
    {
    .ui8TxPin = 3,
    .ui8TxBlock = 2,
    .ui8RxPin = 0,
    .ui8RxBlock = 2,
    .ui8TouchThreshold = 10,
    .pRawCount = BTN00_E14_RawCnts,
    .pTuning = BTN00_E14_Tuning,
    };

    // Sensor: BTN00, Element: E13
    uint16_t BTN00_E13_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning BTN00_E13_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement BTN00_E13 =
    {
    .ui8TxPin = 3,
    .ui8TxBlock = 2,
    .ui8RxPin = 1,
    .ui8RxBlock = 1,
    .ui8TouchThreshold = 10,
    .pRawCount = BTN00_E13_RawCnts,
    .pTuning = BTN00_E13_Tuning,
    };

    // Sensor: BTN00, Element: E15
    uint16_t BTN00_E15_RawCnts[CAPT_MUTUAL_FREQ_CNT];
    tCaptivateElementTuning BTN00_E15_Tuning[CAPT_MUTUAL_FREQ_CNT];
    tElement BTN00_E15 =
    {
    .ui8TxPin = 3,
    .ui8TxBlock = 2,
    .ui8RxPin = 1,
    .ui8RxBlock = 2,
    .ui8TouchThreshold = 10,
    .pRawCount = BTN00_E15_RawCnts,
    .pTuning = BTN00_E15_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: BTN00_C00
    tElement* BTN00_C00_Elements[2] =
    {
    &BTN00_E00,
    &BTN00_E02,
    };
    tCycle BTN00_C00 =
    {
    .ui8NrOfElements = 2,
    .pElements = BTN00_C00_Elements,
    };

    // Time Cycle: BTN00_C01
    tElement* BTN00_C01_Elements[2] =
    {
    &BTN00_E01,
    &BTN00_E03,
    };
    tCycle BTN00_C01 =
    {
    .ui8NrOfElements = 2,
    .pElements = BTN00_C01_Elements,
    };

    // Time Cycle: BTN00_C02
    tElement* BTN00_C02_Elements[2] =
    {
    &BTN00_E04,
    &BTN00_E06,
    };
    tCycle BTN00_C02 =
    {
    .ui8NrOfElements = 2,
    .pElements = BTN00_C02_Elements,
    };

    // Time Cycle: BTN00_C03
    tElement* BTN00_C03_Elements[2] =
    {
    &BTN00_E05,
    &BTN00_E07,
    };
    tCycle BTN00_C03 =
    {
    .ui8NrOfElements = 2,
    .pElements = BTN00_C03_Elements,
    };

    // Time Cycle: BTN00_C04
    tElement* BTN00_C04_Elements[2] =
    {
    &BTN00_E08,
    &BTN00_E10,
    };
    tCycle BTN00_C04 =
    {
    .ui8NrOfElements = 2,
    .pElements = BTN00_C04_Elements,
    };

    // Time Cycle: BTN00_C05
    tElement* BTN00_C05_Elements[2] =
    {
    &BTN00_E09,
    &BTN00_E11,
    };
    tCycle BTN00_C05 =
    {
    .ui8NrOfElements = 2,
    .pElements = BTN00_C05_Elements,
    };

    // Time Cycle: BTN00_C06
    tElement* BTN00_C06_Elements[2] =
    {
    &BTN00_E12,
    &BTN00_E14,
    };
    tCycle BTN00_C06 =
    {
    .ui8NrOfElements = 2,
    .pElements = BTN00_C06_Elements,
    };

    // Time Cycle: BTN00_C07
    tElement* BTN00_C07_Elements[2] =
    {
    &BTN00_E13,
    &BTN00_E15,
    };
    tCycle BTN00_C07 =
    {
    .ui8NrOfElements = 2,
    .pElements = BTN00_C07_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: BTN00
    const tCycle* BTN00_Cycles[8] =
    {
    &BTN00_C00,
    &BTN00_C01,
    &BTN00_C02,
    &BTN00_C03,
    &BTN00_C04,
    &BTN00_C05,
    &BTN00_C06,
    &BTN00_C07,
    };

    tButtonSensorParams BTN00_Params;
    tSensor BTN00 =
    {
    // Basic Properties
    .TypeOfSensor = eButtonGroup,
    .SensingMethod = eProjected,
    .DirectionOfInterest = eDOIUp,
    .pvCallback = NULL,
    .ui8NrOfCycles = 8,
    .pCycle = BTN00_Cycles,
    .pSensorParams = (tGenericSensorParams*)&BTN00_Params,
    // Conversion Control Parameters
    .ui16ConversionCount = 250,
    .ui16ConversionGain = 100,
    .ui8FreqDiv = 1,
    .ui8ChargeLength = 0,
    .ui8TransferLength = 0,
    .bModEnable = false,
    .ui8BiasControl = 3,
    .bCsDischarge = true,
    .bLpmControl = false,
    .ui8InputSyncControl = 0,
    .bTimerSyncControl = false,
    .bIdleState = true,
    // Tuning Parameters
    .ui16ProxThreshold = 12,
    .ui16NegativeTouchThreshold = 30,
    .ui16ErrorThreshold = 8191,
    .ui16TimeoutThreshold = 1000,
    .ProxDbThreshold.DbIn = 1,
    .ProxDbThreshold.DbOut = 0,
    .TouchDbThreshold.DbIn = 1,
    .TouchDbThreshold.DbOut = 0,
    .bCountFilterEnable = false,
    .ui8CntBeta = 2,
    .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 = CAPT_SELF_MODE_CONVERSION_STYLE,
    .projModeConversionStyle = CAPT_PROJ_MODE_CONVERSION_STYLE,

    // Oversampling Style
    .selfModeOversamplingStyle = CAPT_SELF_MODE_OVERSAMPLING_STYLE,
    .projModeOversamplingStyle = CAPT_PROJ_MODE_OVERSAMPLING_STYLE,

    // Jitter Filter Enable
    .bJitterFilterEnable = true,

    // Noise Thresholds and Calibration Noise Limits
    .ui8NoiseThreshold = CAPT_NOISE_THRESHOLD,
    .ui16CalibrationNoiseLimit = CAPT_CALIBRATION_NOISE_LIMIT,
    .ui8CalibrationTestSampleSize = 8,

    // Dynamic Threshold Adjustment Parameters
    .bEnableDynamicThresholdAdjustment = CAPT_DYNAMIC_THRESHOLD_ADJUSTMENT,
    .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] =
    {
    &BTN00,
    };


    //*****************************************************************************
    //
    //! \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 = CAPT_LOW_POWER_MODE,
    .bElementDataTxEnable = true,
    .bSensorDataTxEnable = false,
    .ui16ActiveModeScanPeriod = 12,
    .ui16WakeOnProxModeScanPeriod = 100,
    .ui16InactivityTimeout = 32,
    .ui8WakeupInterval = 5,
    };

  • Hi Darren,

    I need the layout as well.

    Thanks,

    Ling

  • Hi Ling,

    I really appreciate any guidance on this.  Thanks for having a look. 

    On a side note, you'll see that I have 1 prox element as well.  There were meant to be 2 prox elements but I made a mistake in the layout.

    Darren

    Gerber Output.zip

  • Hi Darren,

    The layout and configuration file all looks good.

    Have you tried to connect your board to CapTIvate Design Center to see if the communication is OK?

    Ling

  • And in the software it seems you don't enable the proximity sensor.

  • Hi Ling,

    I've tried many different software configurations with my board, like removing the prox sensor, and making it 1x4 instead of 4x4. 

    I've connected to Captivate Design Center.  I know my EVM boards are working because I've connected it with the other touch boards (BSWP and 64 button).  The BSWP works well.  The 64 button one works well at the beginning, then appears to have a lag depending on which GUI I have open.  My board usually shows no response in the GUI.  I say usually because I saw a sort of proximity type of response once, but haven't been able to repeat it.

    I'll retest and try to collect more information.

    Thanks,

    Darren

     

  • Hi Darren,

    Do you have any update?

    Thanks,

    Ling

  • Hi Ling,

    I've isolated the problem but haven't quite figured out what's breaking.  Every time I updated my Captivate Design Center project, I was generating the code as New Project, then copying and pasting it into the location of the existing CCS Workspace.  The cap touch would work the first time I generated code as a New Project, then did a CCS Import Project.  But if I did a second or third or fourth code generation, generated as a New Project (in Captivate DC), then manually overwrote the code, it wouldn't work.

    Now, I can get it to work by using the Update Existing Project in Captivate DC, and pointing it to the Project Folder. 

    The correct way to do this is described here in Step 3.  http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/CapTIvate_Design_Center/latest/exports/docs/users_guide/html/CapTIvate_Technology_Guide_html/markdown/ch_workshop.html

    I appreciate you checking everything over.

    Thanks,

    Darren

      

  • Hi Darren,

    Glad to hear that the issue was solved and thanks for sharing the debug experience.

    Regards,

    Ling

**Attention** This is a public forum