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.

MSP430FR2676: Capsense Error Handling

Part Number: MSP430FR2676


I'd like to build out some error detection and handling if my MSP gets into a situation where the cap sense peripheral stops working and data isnt updated. (ie. we are just reading and using static data)

Before I get too far, does the captivate library already do some of this error handling? If so, can you describe the recovery mechanism and/or if there is an API function that presents the error detection.

Thank you!

Audrey

  • Hi Audrey,

    The Captivate library doesn't handle errors.  It is left up to the application code.

    During a captivate measurement there is an error called "max count" which can be caused by the converter taking many more conversions than expected.  The default max count is 8191.  This error is rare and usually caused by a shorted electrode.  This error is flagged in the Captivate ISR in CAPT_ISR.c file, (g_bMaxCountErrorFlag ) and you can check this flag anywhere in your code, but ideally you would do this in your callback function just after the sensor is measured.

    The channel that experiences this max count error will take up to 8191 conversions by default and will return a value = 0, but the other channels will convert normally.  You can limit the max count to something < 8191 by setting the sensors's max count error threshold.  Setting a lower threshold, say 1000, will allow the error to be set sooner and not slow down the other conversions on the other channels.

**Attention** This is a public forum