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.
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.
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?
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.