How to user Watch Dog Timer in CY8C4014SXI-421?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ApPo_1339236
Level 2
Level 2
5 sign-ins 10 replies posted 5 replies posted

Dear all group members,

      I am using CY8C4014SXI-421 IC for my CapSense Button

project. My device (CY8C4014SXI-421) should be reset after

5 seconds if I keep the button pressed. So I want to full fill

my requirement through the watch dog timer.

      There is an option of Auto Reset in CapSense Configuration

WIndows. But I get only 1 second of Auto Reset period (According

to my PCB design). I want this period as 5 seconds. So how

I can achieve this through Watch Dog Timer.

0 Likes
1 Solution
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi user_273851460​,

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)

            {

            CapSense_InitializeAllBaselines();

            }

Regards,

Bragadeesh

Regards,
Bragadeesh

View solution in original post

6 Replies
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi user_273851460​,

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)

            {

            CapSense_InitializeAllBaselines();

            }

Regards,

Bragadeesh

Regards,
Bragadeesh

Dear BragadeeshV_41,

       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?

0 Likes

user_273851460​,

Can you please help me understand your requirement better? Do you want to reset the button (Turn Off the button after touching for 5 sec) or reset the device?

Regards,

Bragadeesh

Regards,
Bragadeesh
0 Likes

Hi,

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.

Thanks,
Shanmathi

0 Likes

Dear BragadeeshV_41,

     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.

0 Likes

Hi user_273851460​,

You can use the CapSense_InitializeAllBaselines(); to reset the Capsense sensor.

          if(counterVal > 5000u)

            {

            CapSense_InitializeAllBaselines();

            }

Regards,

Bragadeesh

Regards,
Bragadeesh
0 Likes