- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
in the datasheet of the PSOC5LP in chapter 6.2.1.5 Wakeup Events I found that wakeup events are configurable but I didn't found how. I use hibernate mode and want only one external interrupt as a wakeup source. How can I configure only one out of all external interrupts as a wakeup source?
Or is the solution in AN72382 with the do-while loop the only solution?
As a workaround I switched the other interrupt pins to output, so no other external interrupt can occur.
Thanks for your help.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Look into this appnote which tells that "any unmasked PICU interrupt" can be used to return from hibernate. So you have to mask off all the interrupts you do not want to wake you up. Accessing the PICU is described in this appnote.
Happy coding
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The last AN is the same I mentioned, with the do-while loop. So there is no possibility to do this in "hardware", I always wake up and have to look which external interrupt occured? This would explain why fast toggling signals are not preferred in hibernate mode (wakeup time is too long to save energy).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The do-while is just for the example project. When you have got more than one GPIO-pin casting an interrupt you will have to disable them before hibernating.
In a case like this I usually have two functions that care for all the needed hardware Component_Sleep() calls while the other issues the Component_Wakeup(). This would also be the place to disable/enable the unwanted PICU interrupts.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, but I didn't understand how to disable the unwanted PICU interrupts. I tried using ISR_Stop(), but this only disabled the ISRoutine (the code to execute), not the interrupt itself, so there was a wakeup through this interrupt anyway.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Look at the end of the do-while there is
This line disables the interrupt on port 6 pin 1. The last parameter corresponds to the table at page 14 in the appnote.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This works, thanks.
So I have to save the old state before hibernate, set interrupt to 0x00 and restore it after wakeup. And this for all external interrupts which should not wake up the device.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Principially: Yes
But how many pins and ports did you define to generate an interrupt? Only those pins you have to care for.
Bob
PS: I am located near Bremen, where do you live?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On this device there are only two other external interrupts, so it is no problem. But on a device with more of them it would be easier the other way round.
I'm living near Stuttgart, on the other side of Germany.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not sure if any of this ref material will help, but here it is -
http://www.cypress.com/?rID=64554 AN77900 - PSoC® 3 and PSoC 5LP Low-power Modes and Power Reduction Techniques
http://www.cypress.com/?rID=38267 AN54460 - PSoC® 3, PSoC 4, and PSoC 5LP Interrupts
Regards, Dana.