Part Number: MSP430FR2512
I have a couple of questions related to the settings of the proximity threshold. I have a proximity sensor with the following parameters:
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 = 800,
.ui16ConversionGain = 100,
.ui8FreqDiv = 4,
.ui8ChargeLength = 0,
.ui8TransferLength = 0,
.bModEnable = true,
.ui8BiasControl = 3,
.bCsDischarge = true,
.bLpmControl = false,
.ui8InputSyncControl = 0,
.bTimerSyncControl = false,
.bIdleState = true,
// Tuning Parameters
.ui16ProxThreshold = 20,
.ui16NegativeTouchThreshold = 20,
.ui16ErrorThreshold = 900,
.ui16TimeoutThreshold = 65535,
.ProxDbThreshold.DbIn = 0,
.ProxDbThreshold.DbOut = 3,
.TouchDbThreshold.DbIn = 0,
.TouchDbThreshold.DbOut = 3,
.bCountFilterEnable = true,
.ui8CntBeta = 1,
.bSensorHalt = false,
.bPTSensorHalt = true,
.bPTElementHalt = true,
.ui8LTABeta = 7,
.bReCalibrateEnable = true,
};
The sensor has one element, with a touch threshold of 7.
Sometimes when I touch the sensor, the value of the delta is greater than the proximity threshold (which I understand from the docs is an absolute value), and even greater than the touch threshold, however the sensor does not register as being in a proximity state, and the LTA adjusts downwards.
I have attached the graph below to demonstrate. The LTA, Count and Proximity state were sampled at 50ms, the active scan mode measurement period is 25ms. The touch and proximity thresholds are shown on the graph as I understand them (i.e. 20 less than the LTA for the prox and 7/128 * LTA less than the LTA for touch).
![]()
As far as I can see from the graph, the sensor goes out of proximity state even though the delta is sufficiently high. Even if the sensor value changed signifcantly in the measurement between samples (which seems unlikely given the neighbouring measurements), I would expect the debounce parameters to handle this.
My questions are:
1) Have I correctly understood how the proximity and touch thresholds work?
2) If so, why does the sensor not register as in proxmity and why the LTA continue to adjust downwards?
I have wake-on-proximity enabled if this is relevant
Thanks!