TI中文支持网
TI专业的中文技术问题搜集分享网站

MSPFR2633 的LTA值

MAP_CAPT_registerCallback(
&PRX00,
&Demo_proximityGroupEventHandler1
);

注册用户的回调函数之后:

void Demo_proximityGroupEventHandler1(tSensor* pSensor)
{
uint16_t rawCount_l=0;
uint16_t LTA_addr_l=0;
uint16_t LTA_l=0;
uint16_t delta_l=0;
static uint8_t i=0;
if (pSensor->bSensorNegativeTouch)
{
CAPT_calibrateSensor(pSensor);
return;
}

rawCount_l = *(uint16_t *)(DEMO_LEFT_ELEMENT.pRawCount);
LTA_addr_l = ((uint16_t)&(DEMO_LEFT_ELEMENT.LTA));
LTA_l = min_value(rawCount_l,LTA_addr_l);
printf_msp("1:LTA:%d count:%d,delta:%d\r\n",LTA_addr_l,rawCount_l,LTA_l);

}

发现LTA的值很大,与COUNT值相差太大了,与Design center上面的不一致,请问是为什么?

Susan Yang:

通常,Count和Lta的值几乎相同。Count是测量结果,刷新率为每秒33次。LTA是长时间的平均值。

是一直都是两者相差很大还是在某些情况下?能给出具体数据吗?

若是接近度转换计数以及接近阈值设置有问题的化,会使得接近度传感器非常灵敏。

我们不建议将转化计数conversion count设置为1000以上。

您可以尝试的一些方法:

将转换计数conversion count设置为1000。

将超时阈值 timeout threshold设置为100,也就是如果接近传感器被触发持续了33ms * 100 = 3.3s,则接近传感器将被重新校准。

若是上述方法都不能成功的化,请您上传一下您的配置文件,谢谢

,

user6341679:

你好,按照你的方法改的值之后还是不行:#define min_value(a,b) (((a)>(b))?(a-b):(b-a))
void Demo_proximityGroupEventHandler1(tSensor* pSensor)
{uint16_t rawCount_l=0;uint16_t LTA_addr_l=0;uint16_t LTA_l=0;uint16_t delta_l=0;static uint8_t i=0;if (pSensor->bSensorNegativeTouch){CAPT_calibrateSensor(pSensor);return;}
rawCount_l = *(uint16_t *)(DEMO_LEFT_ELEMENT.pRawCount);LTA_addr_l = ((uint16_t)&(DEMO_LEFT_ELEMENT.LTA));LTA_addr_l = LTA_addr_l;LTA_l = min_value(rawCount_l,LTA_addr_l);printf_msp("1:LTA:%d count:%d,delta:%d\r\n",LTA_addr_l,rawCount_l,LTA_l);
}

我在另一个函数中打印:
bool CAPT_writeElementData(uint8_t ui8SensorID)
{
#if ((CAPT_INTERFACE==__CAPT_BULKI2C_INTERFACE__) || (CAPT_INTERFACE==__CAPT_UART_INTERFACE__))uint8_t ui8Cycle;uint16_t ui16Length;uint16_t ii = 0;//// Ensure that element transmission is enabled, and sensor ID is valid//if ((g_pApp->bElementDataTxEnable == false)|| (g_pApp->pSensorList[ui8SensorID] == 0)){return false;}
//// Transmit element data one cycle at a time.//for (ui8Cycle = 0;ui8Cycle < g_pApp->pSensorList[ui8SensorID]->ui8NrOfCycles;ui8Cycle++){ui16Length = MAP_CAPT_getCyclePacket(g_pApp->pSensorList,ui8SensorID, ui8Cycle, g_PingPongBuffer.pEditBuffer);if (ui16Length==0){return false;}for(ii = 0;ii<ui16Length;ii++){printf_msp(" 0x%x",g_PingPongBuffer.pEditBuffer[ii]);
}printf_msp("\r\n");
#if(CAPT_INTERFACE==__CAPT_UART_INTERFACE__)ui16Length = MAP_CAPT_stuffSyncBytes(g_PingPongBuffer.pEditBuffer,ui16Length);(void)MAP_CAPT_togglePingPongBuffer(&g_PingPongBuffer);UART_transmitBuffer(g_PingPongBuffer.pTransmitBuffer, ui16Length);
#elif (CAPT_INTERFACE==__CAPT_BULKI2C_INTERFACE__)(void)MAP_CAPT_togglePingPongBuffer(&g_PingPongBuffer);I2CSlave_setTransmitBuffer((g_PingPongBuffer.pTransmitBuffer+TL_PCKT_SERIAL_OVRHD_LENGTH),(ui16Length-TL_PCKT_SERIAL_OVRHD_LENGTH));I2CSlave_setRequestFlag();
#endif /* CAPT_INTERFACE SELECTION */}
return true;
#elsereturn false;
#endif
}

以下为数据:0x55 0xaa 0xc 0x1 0x1 0x0 0x0 0x0 0x0 0xce 0x3 0xd8 0x3 0xae 0x1
2:LTA:9464 count:984,delta:84800×55 0xaa 0xc 0x1 0x2 0x0 0x0 0x0 0x0 0xd5 0x3 0xd7 0x3 0xb5 0x10x55 0xaa 0xc 0x1 0x3 0x0 0x0 0x0 0x0 0xda 0x3 0xdb 0x3 0xbf 0x10x55 0xaa 0x18 0x1 0x0 0x0 0x0 0x0 0x0 0xf2 0x1 0xf3 0x1 0xe9 0x1 0xe9 0x1 0xf1 0x1 0xf1 0x1 0xea 0x1 0xea 0x1 0x76 0x70x55 0xaa 0x18 0x1 0x0 0x1 0x0 0x0 0x0 0xf3 0x1 0xf3 0x1 0xf4 0x1 0xf4 0x1 0xef 0x1 0xf3 0x1 0xef 0x1 0xef 0x1 0x98 0x7
1:LTA:9438 count:983,delta:84550×55 0xaa 0xc 0x1 0x1 0x0 0x0 0x0 0x0 0xce 0x3 0xd7 0x3 0xad 0x1
2:LTA:9464 count:977,delta:84870×55 0xaa 0xc 0x1 0x2 0x0 0x0 0x0 0x0 0xd5 0x3 0xd4 0x3 0xb2 0x10x55 0xaa 0xc 0x1 0x3 0x0 0x0 0x0 0x0 0xda 0x3 0xdb 0x3 0xbf 0x10x55 0xaa 0x18 0x1 0x0 0x0 0x0 0x0 0x0 0xf2 0x1 0xf3 0x1 0xe9 0x1 0xe9 0x1 0xf1 0x1 0xf1 0x1 0xea 0x1 0xea 0x1 0x76 0x70x55 0xaa 0x18 0x1 0x0 0x1 0x0 0x0 0x0 0xf3 0x1 0xf3 0x1 0xf4 0x1 0xf4 0x1 0xef 0x1 0xf3 0x1 0xef 0x1 0xef 0x1 0x98 0x7
1:LTA:9438 count:981,delta:84570×55 0xaa 0xc 0x1 0x1 0x0 0x0 0x0 0x0 0xce 0x3 0xd6 0x3 0xac 0x1
2:LTA:9464 count:980,delta:84840×55 0xaa 0xc 0x1 0x2 0x0 0x0 0x0 0x0 0xd5 0x3 0xd4 0x3 0xb2 0x10x55 0xaa 0xc 0x1 0x3 0x0 0x0 0x0 0x0 0xda 0x3 0xdd 0x3 0xc1 0x10x55 0xaa 0x18 0x1 0x0 0x0 0x0 0x0 0x0 0xf2 0x1 0xf3 0x1 0xe9 0x1 0xe9 0x1 0xf1 0x1 0xf1 0x1 0xea 0x1 0xea 0x1 0x76 0x70x55 0xaa 0x18 0x1 0x0 0x1 0x0 0x0 0x0 0xf3 0x1 0xf3 0x1 0xf4 0x1 0xf4 0x1 0xef 0x1 0xf2 0x1 0xef 0x1 0xef 0x1 0x97 0x7
1:LTA:9438 count:983,delta:84550×55 0xaa 0xc 0x1 0x1 0x0 0x0 0x0 0x0 0xce 0x3 0xd6 0x3 0xac 0x1
2:LTA:9464 count:978,delta:84860×55 0xaa 0xc 0x1 0x2 0x0 0x0 0x0 0x0 0xd5 0x3 0xd3 0x3 0xb1 0x10x55 0xaa 0xc 0x1 0x3 0x0 0x0 0x0 0x0 0xda 0x3 0xdc 0x3 0xc0 0x1

,

Susan Yang:

好的,我会在分析确认后给您回复

,

user6341679:

CAPT_UserConfig.c

/* --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_82_00_06 on Thu Nov 19 11:29:45 GMT+08:00 2020//*****************************************************************************
// CAPT_UserConfig.c
//
// \version 1.82.00.02
// Released on January 22, 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 = 10,.pRawCount = BTN00_E00_RawCnts,.pTuning = BTN00_E00_Tuning,
};// Sensor: BTN00, Element: E01
uint16_t BTN00_E01_RawCnts[CAPT_SELF_FREQ_CNT];
tCaptivateElementTuning BTN00_E01_Tuning[CAPT_SELF_FREQ_CNT];
tElement BTN00_E01 =
{.ui8RxPin = 0,.ui8RxBlock = 1,.ui8TouchThreshold = 10,.pRawCount = BTN00_E01_RawCnts,.pTuning = BTN00_E01_Tuning,
};// Sensor: BTN00, Element: E02
uint16_t BTN00_E02_RawCnts[CAPT_SELF_FREQ_CNT];
tCaptivateElementTuning BTN00_E02_Tuning[CAPT_SELF_FREQ_CNT];
tElement BTN00_E02 =
{.ui8RxPin = 0,.ui8RxBlock = 2,.ui8TouchThreshold = 10,.pRawCount = BTN00_E02_RawCnts,.pTuning = BTN00_E02_Tuning,
};// Sensor: BTN00, Element: E03
uint16_t BTN00_E03_RawCnts[CAPT_SELF_FREQ_CNT];
tCaptivateElementTuning BTN00_E03_Tuning[CAPT_SELF_FREQ_CNT];
tElement BTN00_E03 =
{.ui8RxPin = 0,.ui8RxBlock = 3,.ui8TouchThreshold = 10,.pRawCount = BTN00_E03_RawCnts,.pTuning = BTN00_E03_Tuning,
};// Sensor: BTN00, Element: E04
uint16_t BTN00_E04_RawCnts[CAPT_SELF_FREQ_CNT];
tCaptivateElementTuning BTN00_E04_Tuning[CAPT_SELF_FREQ_CNT];
tElement BTN00_E04 =
{.ui8RxPin = 1,.ui8RxBlock = 0,.ui8TouchThreshold = 10,.pRawCount = BTN00_E04_RawCnts,.pTuning = BTN00_E04_Tuning,
};// Sensor: BTN00, Element: E05
uint16_t BTN00_E05_RawCnts[CAPT_SELF_FREQ_CNT];
tCaptivateElementTuning BTN00_E05_Tuning[CAPT_SELF_FREQ_CNT];
tElement BTN00_E05 =
{.ui8RxPin = 1,.ui8RxBlock = 1,.ui8TouchThreshold = 10,.pRawCount = BTN00_E05_RawCnts,.pTuning = BTN00_E05_Tuning,
};// Sensor: BTN00, Element: E06
uint16_t BTN00_E06_RawCnts[CAPT_SELF_FREQ_CNT];
tCaptivateElementTuning BTN00_E06_Tuning[CAPT_SELF_FREQ_CNT];
tElement BTN00_E06 =
{.ui8RxPin = 1,.ui8RxBlock = 2,.ui8TouchThreshold = 10,.pRawCount = BTN00_E06_RawCnts,.pTuning = BTN00_E06_Tuning,
};// Sensor: BTN00, Element: E07
uint16_t BTN00_E07_RawCnts[CAPT_SELF_FREQ_CNT];
tCaptivateElementTuning BTN00_E07_Tuning[CAPT_SELF_FREQ_CNT];
tElement BTN00_E07 =
{.ui8RxPin = 1,.ui8RxBlock = 3,.ui8TouchThreshold = 10,.pRawCount = BTN00_E07_RawCnts,.pTuning = BTN00_E07_Tuning,
};// Sensor: PRX00, Element: E00
uint16_t PRX00_E00_RawCnts[CAPT_SELF_FREQ_CNT];
tCaptivateElementTuning PRX00_E00_Tuning[CAPT_SELF_FREQ_CNT];
tElement PRX00_E00 =
{.ui8RxPin = 1,.ui8RxBlock = 2,.ui8TouchThreshold = 10,.pRawCount = PRX00_E00_RawCnts,.pTuning = PRX00_E00_Tuning,
};// Sensor: PRX01, Element: E00
uint16_t PRX01_E00_RawCnts[CAPT_SELF_FREQ_CNT];
tCaptivateElementTuning PRX01_E00_Tuning[CAPT_SELF_FREQ_CNT];
tElement PRX01_E00 =
{.ui8RxPin = 0,.ui8RxBlock = 2,.ui8TouchThreshold = 10,.pRawCount = PRX01_E00_RawCnts,.pTuning = PRX01_E00_Tuning,
};// Sensor: PRX02, Element: E00
uint16_t PRX02_E00_RawCnts[CAPT_SELF_FREQ_CNT];
tCaptivateElementTuning PRX02_E00_Tuning[CAPT_SELF_FREQ_CNT];
tElement PRX02_E00 =
{.ui8RxPin = 3,.ui8RxBlock = 3,.ui8TouchThreshold = 10,.pRawCount = PRX02_E00_RawCnts,.pTuning = PRX02_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[4] =
{&BTN00_E00,&BTN00_E01,&BTN00_E02,&BTN00_E03,
};
tCycle BTN00_C00 =
{.ui8NrOfElements = 4,.pElements = BTN00_C00_Elements,
};// Time Cycle: BTN00_C01
tElement* BTN00_C01_Elements[4] =
{&BTN00_E04,&BTN00_E05,&BTN00_E06,&BTN00_E07,
};
tCycle BTN00_C01 =
{.ui8NrOfElements = 4,.pElements = BTN00_C01_Elements,
};// Time Cycle: PRX00_C00
tElement* PRX00_C00_Elements[1] =
{&PRX00_E00,
};
tCycle PRX00_C00 =
{.ui8NrOfElements = 1,.pElements = PRX00_C00_Elements,
};// Time Cycle: PRX01_C00
tElement* PRX01_C00_Elements[1] =
{&PRX01_E00,
};
tCycle PRX01_C00 =
{.ui8NrOfElements = 1,.pElements = PRX01_C00_Elements,
};// Time Cycle: PRX02_C00
tElement* PRX02_C00_Elements[1] =
{&PRX02_E00,
};
tCycle PRX02_C00 =
{.ui8NrOfElements = 1,.pElements = PRX02_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[2] =
{&BTN00_C00,&BTN00_C01,
};tButtonSensorParams BTN00_Params;
tSensor BTN00 =
{// Basic Properties.TypeOfSensor = eButtonGroup,.SensingMethod = eSelf,.DirectionOfInterest = eDOIDown,.pvCallback = NULL,.ui8NrOfCycles = 2,.pCycle = BTN00_Cycles,.pSensorParams = (tGenericSensorParams*)&BTN00_Params,// Conversion Control Parameters.ui16ConversionCount = 500,.ui16ConversionGain = 100,.ui8FreqDiv = 2,.ui8ChargeLength = 0,.ui8TransferLength = 0,.bModEnable = false,.ui8BiasControl = 3,.bCsDischarge = true,.bLpmControl = false,.ui8InputSyncControl = 0,.bTimerSyncControl = false,.bIdleState = true,// TuningParameters.ui16ProxThreshold = 10,.ui16NegativeTouchThreshold = 30,.ui16ErrorThreshold = 8191,.ui16TimeoutThreshold = 65535,.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: PRX00
const tCycle* PRX00_Cycles[1] =
{&PRX00_C00,
};tProxSensorParams PRX00_Params =
{.pSensor = NULL,.ui8NumberOfSensors = 0,
};tSensor PRX00 =
{// Basic Properties.TypeOfSensor = eProx,.SensingMethod = eSelf,.DirectionOfInterest = eDOIDown,.pvCallback = NULL,.ui8NrOfCycles = 1,.pCycle = PRX00_Cycles,.pSensorParams = (tGenericSensorParams*)&PRX00_Params,// Conversion Control Parameters.ui16ConversionCount = 1000,.ui16ConversionGain = 100,.ui8FreqDiv = 2,.ui8ChargeLength = 0,.ui8TransferLength = 0,.bModEnable = false,.ui8BiasControl = 3,.bCsDischarge = true,.bLpmControl = false,.ui8InputSyncControl = 0,.bTimerSyncControl = false,.bIdleState = true,// TuningParameters.ui16ProxThreshold = 20,.ui16NegativeTouchThreshold = 30,.ui16ErrorThreshold = 8191,.ui16TimeoutThreshold = 100,.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: PRX01
const tCycle* PRX01_Cycles[1] =
{&PRX01_C00,
};tProxSensorParams PRX01_Params =
{.pSensor = NULL,.ui8NumberOfSensors = 0,
};tSensor PRX01 =
{// Basic Properties.TypeOfSensor = eProx,.SensingMethod = eSelf,.DirectionOfInterest = eDOIDown,.pvCallback = NULL,.ui8NrOfCycles = 1,.pCycle = PRX01_Cycles,.pSensorParams = (tGenericSensorParams*)&PRX01_Params,// Conversion Control Parameters.ui16ConversionCount = 1000,.ui16ConversionGain = 100,.ui8FreqDiv = 2,.ui8ChargeLength = 0,.ui8TransferLength = 0,.bModEnable = false,.ui8BiasControl = 3,.bCsDischarge = true,.bLpmControl = false,.ui8InputSyncControl = 0,.bTimerSyncControl = false,.bIdleState = true,// TuningParameters.ui16ProxThreshold = 20,.ui16NegativeTouchThreshold = 30,.ui16ErrorThreshold = 8191,.ui16TimeoutThreshold = 100,.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: PRX02
const tCycle* PRX02_Cycles[1] =
{&PRX02_C00,
};tProxSensorParams PRX02_Params =
{.pSensor = NULL,.ui8NumberOfSensors = 0,
};tSensor PRX02 =
{// Basic Properties.TypeOfSensor = eProx,.SensingMethod = eSelf,.DirectionOfInterest = eDOIDown,.pvCallback = NULL,.ui8NrOfCycles = 1,.pCycle = PRX02_Cycles,.pSensorParams = (tGenericSensorParams*)&PRX02_Params,// Conversion Control Parameters.ui16ConversionCount = 1000,.ui16ConversionGain = 100,.ui8FreqDiv = 2,.ui8ChargeLength = 0,.ui8TransferLength = 0,.bModEnable = false,.ui8BiasControl = 3,.bCsDischarge = true,.bLpmControl = false,.ui8InputSyncControl = 0,.bTimerSyncControl = false,.bIdleState = true,// TuningParameters.ui16ProxThreshold = 20,.ui16NegativeTouchThreshold = 30,.ui16ErrorThreshold = 8191,.ui16TimeoutThreshold = 100,.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 = 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,&PRX00,&PRX01,&PRX02,
};//*****************************************************************************
//
//! \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,
};

,

Susan Yang:

请问是否能给出您的conversion count等配置参数?建议您附上CAPT_UserConfig.c 和 CAPT_UserConfig.h文件

,

user6341679:

CAPT_UserConfig.h

,

Eason Zhou:

你好,

LTA不是uint16类型的数。怎么转换你可以参考:

MSP430-IQmathLib-UsersGuide.pdf

赞(0)
未经允许不得转载:TI中文支持网 » MSPFR2633 的LTA值
分享到: 更多 (0)