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.

MSP-EXP430F5529LP: Programming MSP430FR2633 using MSP-EXP430F5529LP

Part Number: MSP-EXP430F5529LP
Other Parts Discussed in Thread: MSP430FR2633, , CAPTIVATE-PGMR, TIDA-00343, TIDM-1021

Hi team,

I am working on MSP430FR2633 MCU on a custom board using the debugger built in the  MSP-EXP430F5529LP launchpad running in self capacitance mode. The touch isn't getting detected even after generating code
can anyone help me out with this. Below is the configuration code attached

#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_SELF_FREQ_CNT];
tCaptivateElementTuning BTN00_E00_Tuning[CAPT_SELF_FREQ_CNT];
tElement BTN00_E00 =
{
.ui8RxPin = 0,
.ui8RxBlock = 0,
.ui8TouchThreshold = 60,
.pRawCount = BTN00_E00_RawCnts,
.pTuning = BTN00_E00_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[1] =
{
&BTN00_E00,
};
tCycle BTN00_C00 =
{
.ui8NrOfElements = 1,
.pElements = BTN00_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: BTN00
const tCycle* BTN00_Cycles[1] =
{
&BTN00_C00,
};

tButtonSensorParams BTN00_Params;
tSensor BTN00 =
{
// Basic Properties
.TypeOfSensor = eButtonGroup,
.SensingMethod = eSelf,
.DirectionOfInterest = eDOIDown,
.pvCallback = NULL,
.ui8NrOfCycles = 1,
.pCycle = BTN00_Cycles,
.pSensorParams = (tGenericSensorParams*)&BTN00_Params,
// Conversion Control Parameters
.ui16ConversionCount = 800,
.ui16ConversionGain = 100,
.ui8FreqDiv = 2,
.ui8ChargeLength = 0,
.ui8TransferLength = 0,
.bModEnable = true,
.ui8BiasControl = 3,
.bCsDischarge = true,
.bLpmControl = false,
.ui8InputSyncControl = 0,
.bTimerSyncControl = false,
.bIdleState = true,
// Tuning Parameters
.ui16ProxThreshold = 40,
.ui16NegativeTouchThreshold = 20,
.ui16ErrorThreshold = 8191,
.ui16TimeoutThreshold = 10000,
.ProxDbThreshold.DbIn = 1,
.ProxDbThreshold.DbOut = 0,
.TouchDbThreshold.DbIn = 2,
.TouchDbThreshold.DbOut = 1,
.bCountFilterEnable = false,
.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 = 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 = true,
.ui16ActiveModeScanPeriod = 33,
.ui16WakeOnProxModeScanPeriod = 100,
.ui16InactivityTimeout = 32,
.ui8WakeupInterval = 5,
};

  • I think you need a captivate programmer (CAPTIVATE-PGMR) to read the data and then I can help you know what happens and how to adjust.

  • Now we have connected the CAPTIVATE-PGMR and able to read the data on captivate design center. But unable to detect the touch 

  • Yea i have changed the threshold value

  • Below is the current config.c code

    /* --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_83_00_08 on Tue Sep 19 11:47:20 IST 2023


    //*****************************************************************************
    // CAPT_UserConfig.c
    //
    // \version 1.83.00.05
    // Released on May 15, 2020
    //
    //*****************************************************************************

    //*****************************************************************************
    //
    // 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_SELF_FREQ_CNT];
    tCaptivateElementTuning BTN00_E00_Tuning[CAPT_SELF_FREQ_CNT];
    tElement BTN00_E00 =
    {
    .ui8RxPin = 0,
    .ui8RxBlock = 0,
    .ui8TouchThreshold = 60,
    .pRawCount = BTN00_E00_RawCnts,
    .pTuning = BTN00_E00_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[1] =
    {
    &BTN00_E00,
    };
    tCycle BTN00_C00 =
    {
    .ui8NrOfElements = 1,
    .pElements = BTN00_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: BTN00
    const tCycle* BTN00_Cycles[1] =
    {
    &BTN00_C00,
    };

    tButtonSensorParams BTN00_Params;
    tSensor BTN00 =
    {
    // Basic Properties
    .TypeOfSensor = eButtonGroup,
    .SensingMethod = eSelf,
    .DirectionOfInterest = eDOIDown,
    .pvCallback = NULL,
    .ui8NrOfCycles = 1,
    .pCycle = BTN00_Cycles,
    .pSensorParams = (tGenericSensorParams*)&BTN00_Params,
    // Conversion Control Parameters
    .ui16ConversionCount = 800,
    .ui16ConversionGain = 100,
    .ui8FreqDiv = 3,
    .ui8ChargeLength = 0,
    .ui8TransferLength = 0,
    .bModEnable = true,
    .ui8BiasControl = 3,
    .bCsDischarge = true,
    .bLpmControl = false,
    .ui8InputSyncControl = 0,
    .bTimerSyncControl = false,
    .bIdleState = true,
    // Tuning Parameters
    .ui16ProxThreshold = 37,
    .ui16NegativeTouchThreshold = 20,
    .ui16ErrorThreshold = 8191,
    .ui16TimeoutThreshold = 60000,
    .ProxDbThreshold.DbIn = 1,
    .ProxDbThreshold.DbOut = 1,
    .TouchDbThreshold.DbIn = 3,
    .TouchDbThreshold.DbOut = 3,
    .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 = 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 = true,
    .ui16ActiveModeScanPeriod = 33,
    .ui16WakeOnProxModeScanPeriod = 100,
    .ui16InactivityTimeout = 32,
    .ui8WakeupInterval = 5,
    };

  • I can't get what happens through the code, can you use the data logging function to log the data? You can find how to do that in the doc shared by me before.

  • Hi Eason Zhou,

    Thank you for your response.

    I've referred the doc you have shared for data logging function, same way have set the data logger in the GUI. The bar chart doesn't display any data.

    Currently, we are utilizing the MSP430FR2633 to detect touch input on the TIDA-00343 touch panel. According to the user guide, we expected the delta value for the buttons to be around 50. However, it's concerning that we're seeing values ranging from 0 to 3 instead.

    Could you please advise us on the next steps we should take to address this issue? Your guidance in simplifying and resolving this discrepancy would be much appreciated.

       

    Below code for the data log is present in the CCS

    Looking forward to your assistance.

  • Also have referred the doc https://www.ti.com/lit/ug/tidubj7/tidubj7.pdf?ts=1695295189872&ref_url=https%253A%252F%252Fwww.google.com%252F and updated the conversion count, conversion gain and counter filter beta value. There isn't any progress in the touch detection

  • Can you share your PCB design. It looks like that the signal is too small. You may need to change the hardware design.

  • we have used TIDA-00343 and wired it to MSP430FR2633IDA.

    Before using the TIDA-00343 design, we used the TIDM-1021  reference design in mutual capacitance mode with buttons 1, 4, and 7 set for touch detection. Button 4 worked fine, but buttons 1 and 7 didn't work at all. When we pressed buttons 3, 6, and 9, it showed a strange negative touch response.

  • 1. I think you need to make the wired trace to be as short as possible. Otherwise this sensivity will be influenced.

     2. Please put some picture to help me know what happens. Otherwise, I also don't know why "When we pressed buttons 3, 6, and 9, it showed a strange negative touch response."

  • Below is the connection made for both TIDA-00343 and TIDM-1021 reference design

    Touch_sensor.pdf

  • Hi Pallavi,

    What part you want it work? TIDA-00343 or TIDM-1021? I am a little confused.

    One is for mutual mode, one is for self mode. Please make sure the used IO is different?

    Can you give a summery of the problem you meet? Signal is small or the signal is negative?

    I see you remove the resistor, I think it will affect TIDM-1021.

    What about start from the code for these EVM?

    Before touching, I suggest you add a cover on the PCB. otherwise the signal will be too strong.

    Eason

  • I want to work with TIDM-1021 in mutual mode
    thank you the suggestion to add cover on pcb. Will try and get back to you

**Attention** This is a public forum