- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the code only use systic or sleeptimer, they work well, if you use them together, the systic will only work once.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you please be a bit more specific regarding your problem?
Which PSoC do you use?
Which development kit have you got or do you use your own board?
Which Creator version are you using?
Can you post your complete project, so that we all can have a look at all of your settings? To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting .zip file.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which PSoC do you use?
Which development kit have you got or do you use your own board?
CY8CKIT-050 PSoC® 5LP
Which Creator version are you using?
3.1 and 3.2
Can you post your complete project, so that we all can have a look at all of your settings? To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting .zip file.
You can use sleeptimer example as base project and add CySysTicStart(),CySysTicSetCallback(callbackFuc),
the callbackFuc will never run anymore if you call CyPmSleep() once, the SleepTimer set to 1S~4S, but the code in main() without effect.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I do not want to change anything, so when you post your project, I have something to start with.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's obviously the SleepTimer work with CyPmSleep caused unstable, even the base SleepTimer example code can't work stable, the interrupt actived by the SleepTimer once or twice.
Thanks for your reply! But I've removed the SleepTimer and CyPmSleep function, these function make the MCU out of my control.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you read the hint that CyPmSleep will not work with debugging?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I debug by LCD, please focus on the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please check AN54460 - PSoC® 3 and PSoC 5LP Interrupts (http://www.cypress.com/?rID=38267). This AN has explanation on Systick Timer in Cortex-M3 and has an example project on how to use systick with PSoC 5LP. The systick is clocked by the BUS_CLK. Please check Section 15 "System Timer (SysTick)" in the System Reference Guide.
So systick cannot be used as a wake-up source and cannot be used in Sleep
Please check the function void CySysTickSetClockSource(uint32 clockSource) in the System Reference Guide. You can call this function to run the Systick either using System Clock or using ILO 100 KHz for PSoC 5LP. Change this to ILO and see if it works in low power mode.
-Keerthi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@kylongmu,
Try to re-enable SysTick with code:
SysTick->CTRL=1; //enable
// SysTick->CTRL=0; //disable
Each time SysTick is expiring, it fires interrupt AND reenables timer.
If system goes asleep, interrupt will not fire and timer won't reload.
Just a theory.