Announcements

Equip yourself to optimize PSoc4 MCUs for Evs at the EV Webinar. Click here to register.

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

PSoC™ 4 Forum Discussions

Anonymous
Not applicable

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.

pastedImage_0.png

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

0 Likes
1 Solution

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

View solution in original post

0 Likes
4 Replies
Anonymous
Not applicable

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.

0 Likes
GyanC_36
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

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

0 Likes
Anonymous
Not applicable

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?

0 Likes

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

0 Likes