cancel
Showing results for 
Search instead for 
Did you mean: 

simple 3 Button Touch Key application using TSC on STM32L431 goes wrong when power supply drops from 3.3V to approx 3.0V then recovers to 3.3V.

ingwmeier
Senior

simple 3 Button Touch Key application using TSC on STM32L431 goes wrong when VDD power supply drops from 3.3V to approx 3.0V (just above BOR level) then recovers to 3.3V.

All 3 Buttons are read back as active from this point on. Has anybody experienced this behaviour?

Solution is to make a software reset, if this scenario is detected.

1 ACCEPTED SOLUTION

Accepted Solutions
Stassen.C
ST Employee

Hi ingwmeier,

Could you give us more detail on how the VDD drops to 3.0V, does it happen often? Does it drop instantly or slowly?

Note that: The TSC IP doesn't support an instant drop of the VDD. It will go into an undetermined state and a recalibration is required at this point in the software.

If you know when it happens or if it happens often you could rework the code in such a way that when the drop is detected, you stop the TSC acquisitions and recalibrate the system and then restart the acquisitions.

Regards,

Stassen

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

4 REPLIES 4

I wonder if this is hardware related, or just purely matter of any software library used.

JW

Stassen.C
ST Employee

Hi ingwmeier,

Could you give us more detail on how the VDD drops to 3.0V, does it happen often? Does it drop instantly or slowly?

Note that: The TSC IP doesn't support an instant drop of the VDD. It will go into an undetermined state and a recalibration is required at this point in the software.

If you know when it happens or if it happens often you could rework the code in such a way that when the drop is detected, you stop the TSC acquisitions and recalibrate the system and then restart the acquisitions.

Regards,

Stassen

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

ingwmeier
Senior

Thank you for the quick confirmation of our finding. The Voltage drop is a worst case scenario, with a power interruption of a very specific time, or an overload situation on the bus power, that could theoretically happen in a safety project.

Our solution is now simple: we measure the input voltage (normally 24V) and set a flag, whenever it drops below 8V, when the system recovers to normal, we then make a software reset if the flag is set.

I wondered, if stop calling updateTSL() in an undervoltage condition would prevent this undetermined state.

Regards Werner

Stassen.C
ST Employee

Yes you definitely want to stop acquisitions in this condition, the most important thing is to recalibrate the system before restarting the acquisitions.

Here is the link with the calibration APIs if you need:

https://community.st.com/s/question/0D53W00000e28bGSAQ/tsc-how-to-manually-trigger-calibration-in-touch-sensing-controller

The 2 important functions are:

void STMTBOX_StartCalibration(void)

void STMTBOX_WaitEndOfCalibration(void)

Regards,

Stassen

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.