- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all
I am trying to build a project with some timing flags(16Hz/8Hz/4Hz...etc) so that I can perform the tasks accordingly.
According to the above table, since I don't have any comparator/I2C/GPIO interrupt in my project, the only wakeup source seems to be the WDT(Configured Timer0 to 16Hz).
But WDT timer introduce some weird behavior in my project (Enter ISR twice after waking up before going into any code), so I am trying to use SysTick to generate the flags.
Then I saw something on the internet saying SysTick can wakeup from DeepSleep, so I tried it.
Guess what! it works!
But since the spec suggest otherwise, I am here to ask did I do something wrong?
(e.g. Device didn't really enter DeepSleep, so SysTick didn't really wakeup the device but just generate some ticks while running...etc?)
Been confused for a while now
Solved! Go to Solution.
- Labels:
-
PSoC 4 Architecture
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Benny,
When you use debugger, the device may not enter deep sleep.
This may be the reason why Systick timer was able to wake up your device and why WDT did not work as expected.
It is not recommended to use debugger while the device is in low power mode (in this case, deep sleep).
In case you would like to debug, you can very well use UART in your application.
Thanks,
Shanmathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Forgot to provide some details
I am using the dev kit CY8CKIT-149
Since the project needs current management so DeepSleep mode is a must.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The Systick timer uses the Cortex-M0 internal IMO clock as a source. In DeepSleep IMO clock source is not available. You could use WDT timer as a periodic interrupt source in DeepSleep which uses ILO clock source and available in DeepSleep. Please refer the WDT code example available in PSoC Creator ( Navigate to the 'File'->Code Examples -> Search for 'WDT_P4_Example' ) for the implementation.
-Gyan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply.
As I mentioned, I originally used WDT to generate those time flags, but the device enters the timer0 (WDT timer0) ISR twice after waking up and then go to the main loop.
It happens only in Debug environment (used LED to wrap the ISR, didn't see 2 entrance of it if it is standalone)
Anything I can do so that it can perform as expected in debug environment?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Benny,
When you use debugger, the device may not enter deep sleep.
This may be the reason why Systick timer was able to wake up your device and why WDT did not work as expected.
It is not recommended to use debugger while the device is in low power mode (in this case, deep sleep).
In case you would like to debug, you can very well use UART in your application.
Thanks,
Shanmathi