1 of 1 people found this helpful
In the auto reset feature of the Capsense component, the baseline always tracks the raw counts in case of Capsense component v6.0 or the baseline tracks the raw count if the button is pressed greater than 5 seconds in case of Capsense component v2.6
This feature will be helpful in preventing sensors from permanently turning on when the raw count accidentally rises due to a large power supply voltage fluctuation or other spurious conditions. This feature will not reset the device. It resets only the sensor.
Now, you can use a SysTick timer to measure the interval for which the button was pressed. If the button was pressed more than 5 seconds, you can perform a reset using CySoftwareReset().
You can refer to the Knowledge Base Article : Measuring Duration of CapSense Button Press Using SysTickTimer - KBA226863 to measure the time for which a button was pressed using SysTick.
You can use the CapSense_InitializeAllBaselines(); to reset the Capsense sensor after 5 seconds.
if(counterVal > 5000u)
I followed your suggestion and had a look on Measuring Duration of CapSense Button Press Using SysTickTimer - KBA226863
article. I applied this on my project and it is working properly. I Reset my device after 5 seconds by using SysTick Timer.
Now I don't want to use SysTick Timer. I want the button should be reset after 5 seconds of pressing it. Is it possible? Or is it
possible to use Watchdog Timer?
Please let us know if you do not want to use software reset and prefer only WDT reset, and if there are any other reasons for not using SysTick timer. We would like to understand your situation better.
If you use WDT, there is one disadvantage. The ILO frequency is inaccurate and needs to be trimmed frequently to improve the accuracy. But yes, a WDT reset could be done if that is your system requirement.
Else, there is another option. You could increase the debounce parameter of your sensor such that sensor shall be active only after 5 second press. You could issue a software reset, if that sensor is active by checking IsSensorActive() API.
Pls refer to CapSense component datasheet for more details on debounce parameter.
As per your suggestion of SysTick Timer, my requirement is fully
accomplished. But now I want to learn the method of resetting the
button after 5 seconds (If any). As per my CapSense Design I only
get 1 seconds of Button auto reset period (I am using Manual Tuning
Method.) So suggest me any method to increase button auto reset
period if it is possible. Button Diameter is 20mm and Button to
Ground clearance is 2mm.