- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I am using cyble214015-01.
In my application, I am using watchdog timers 0 & 1 as deep sleep timers for application purposes.
And I want to use watchdog time 2 as a watchdog (to cause a reset every 4 sec if the app gets stuck).
I know that wtd2 can't cause a reset but I'm ok for now to force a software reset in the interrupt handler for wdt2.
I'm also using the low power modes as described in the following document "001-92584_AN92584_Designing_for_Low_Power_and_Estimating_Battery_Life_for_BLE_Applications"
the problem I'm facing is when I go to deep sleep while the watchdog is initialized, the watchdog is always firing. So, I tried to disable and enable the watchdog every time I went to sleep/deep sleep mode but the watchdog continues to fire. Can anyone tell me the reason for this and what is the solution to this issue?
the project is attached below.
regards,
Mohanad
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Mohanad,
In your project you have the following flow:
1. Make settings for the WDT and enable it by calling the wdt_init function in the main().
2. Everytime the wdt interrupt is triggered you are calling the CySoftwareReset function.
The reset function will cause the execution to start again from main.c where again step 1 is executed and the wdt is enabled again. Can you comment the software reset function and see if you see the same issue?
How are you confirming that the device has entered deep sleep/ sleep?
I am attaching a simple wdt project where I have disabled the wdt after the first interrupt and it works as expected.
Can you please run that project on your kit and see if the issue exits?
Best Regards
Ekta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Mohanad,
In your project you have the following flow:
1. Make settings for the WDT and enable it by calling the wdt_init function in the main().
2. Everytime the wdt interrupt is triggered you are calling the CySoftwareReset function.
The reset function will cause the execution to start again from main.c where again step 1 is executed and the wdt is enabled again. Can you comment the software reset function and see if you see the same issue?
How are you confirming that the device has entered deep sleep/ sleep?
I am attaching a simple wdt project where I have disabled the wdt after the first interrupt and it works as expected.
Can you please run that project on your kit and see if the issue exits?
Best Regards
Ekta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I tried the example and it worked. but the thing is I need to refresh the WDT in the main loop but the thing is the WDT interrupt fires