- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Folks,
I'm putting PSoC5LP in sleep mode as soon as it receives an int coming from the LV detection block (raised thru the Global Signal component). There's of course a battery back up feeding the CPU while the PS is off, mainly for ram retention & keeping the RTC running.
However when the power supply comes back to life, I'm unable to wake up the processor using CyPmSleep(PM_SLEEP_TIME_NONE, PM_SLEEP_SRC_VD).
There is not so much doc/explanation/example about PM_SLEEP_SRC_VD used whithin CyPmSleep.
Is anyone able to give me further explanation?
Michel
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I understand the functioning of the CyPmSleep() just the other way round: It will wake you up when an LV situation occurs. Just for giving you a bit of time to do the absolute needed (STOP Motors!!! Freeze pins).
Since you cannot remove the LV situation which will still exist when woken up, you will be in need to cancel LV monitoring by software until power is restored back again.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The system reference guide in the documentation part of Creator
has a lot of notes regarding power control functions and exceptions.
Maybe take a look at that to see what your code does not reflect.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok thx for the answers.
Bob is right (once again ), regarding the WakeUp parameter of the CyPmSleep().
I'm working on another solution, migth break a little bit the current design (and boards ).
Can't learn without shattering eggs...
See you for the omelet
Michel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK,
Let's go on, as I've cooked the omelet but not eaten it yet!
With a slight modification of the boards, I'm now able to put the proc in sleep and wake it up correctly (thru a pushbutton for the moment). This is great.
I'm now fighting against consumption.
The DMM is connected in series with all the Vddd/Vdda/Vddio pins. This way I'm sure to monitor the PSoC5LP current.
I've stopped all the unnecessary blocks (xxx_Stop() : USBFS, 4xUART, EEPROM), and switched all the output pins as HZ digital input to avoid any sourcing current. All the com cables have been disconnected from the board. All the leds switched off (these pins have not been switched in HZ, but left totem pole).
I've kept the RTC running + a few logical blocs that can't be stopped by software (Debouncer, Status Reg, Global Signal).
In sleep mode the PSoC is drawing 6mA. Well, for a 2032 coin cell, this is approximately 25 hours, far away from what is expected.
I've slowed down the IMO before entering sleep mode, swtiched the JTAG pins to GPIOs, and removed the Miniprog once flashed.
I'm becoming crasy because I can't find the component which is drawing this amount of current.
What other way I should explore ?
One more question: would it be better to put the output pins as HZ analog input instead of digital?
Michel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I presume you have seen this and followed all recommendations ?
http://www.cypress.com/?rID=64554 AN77900 - PSoC® 3 and PSoC 5LP Low-power Modes and Power Reduction Techniques
Also note there is a power estimator spreadsheet at bottom of the above ap notes page.
http://www.cypress.com/?rID=43337 AN61290 - PSoC® 3 and PSoC 5LP Hardware Design Considerations
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Dana,
I read again (and again) and switched off the outputs to HZ analog inputs as per AN61290 stating "If a GPIO, SIO, or USBIO is not used, it should be left floating and in the high impedance analog state..."
May be some few µA less, but not significant.
Then I killed the USB self-powered bloc (and commented the corresponding lines of code) => went down to 1.5mA (I guess the corresponding 2 IO automatiquely shifted in HZ at recompilation).
This is more than a 2/3 cut! A comment here : putting the USB block in Stop() mode didn't significantly lower the consumption, w/o the com cable. More than 4mA : this is far away than what the datasheet mentions : IUSB_Suspended 300µA for 5V, cable disconnected. Any comment on this?
Michel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is becoming a soap...
I reintegrated the USB block and used the 2 API functions _Suspend() and _Resume(). I got the same consumption 1.5mA which is currently my best.
I've dug a little bit deeper tracking those precious hundreds of µAmps without success. There is still a leak somewhere but hard to find it.
I'm gonna review the component datasheets, may be using Sleep or Suspend instead of Stop would give me more luck.
See you soon.
Michel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just a thought but create an empty project with just the sleep
command and see if the power makes sense, if not something about
HW lashup that is at issue. You would still have to observe notes
in ap note and system reference guide.
Also maye a quick check of your meter with a simple R attached to Vdd,
see if meter makes sense when measuring current.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dana,
I tried your inquiry:
int main()
{
CyGlobalIntEnable;
CyDelay(500);
// CyFlash_SetWaitCycles(3); // Reduce clock
// CyDelayFreq(3000000);
// CyIMO_SetFreq(CY_IMO_FREQ_3MHZ);
CyPmSaveClocks();
CyPmSleep(PM_SLEEP_TIME_NONE, PM_SLEEP_SRC_NONE); // Forever
}
With or without reducing the clock, still 1310µA (fluctuating 3 lsb) on my other DMM (the 1st one says 1.43mA).
All pins in Analog HZ, no components, no PLL, no USB, ILO set to 1kHz, no XTAL 32kHz.
Will check another board.
Michel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Michel, can you please post that project to have a look at?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you seen this - www.cypress.com/
You saw the DVK mods to measure power in appendix B of AN77900 (if
you are using DVK board) ?
Post your schematic.......
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dana & Bob,
Thx for the help. No DVK used, it's a proto board.
May send you the project & schematics but I'm under a NDA with my customer.
Can only send by private mail which means I need your respective addresses.
You may join me at michel.kowalczuk@free.fr
Michel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was not thinking of your companie's project, but as far as I understood you, you have built a rather small example that already used quite more current than expected. This is what I'd like to see uploaded to check every setting.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes Bob,
This is a rather small one...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, the upload seems to be difficult (Firefox).
Try again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry Bob,
Don't see the upload in the previous posts (Design02.zip), something stuck in the Cypress server ?
What the server returns (if it can help the admin):
The value of the attribute destination, which is currently C:\inetpub\wwwroot\Cypress.com\files\, is invalid. | |
Message | Attribute validation error for tag CFFILE. |
StackTrace | coldfusion.tagext.InvalidTagAttributeException: Attribute validation error for tag CFFILE. at coldfusion.tagext.io.FileUtils.determineDest(FileUtils.java:591) at coldfusion.tagext.io.FileTag.upload(FileTag.java:652) at coldfusion.tagext.io.FileTag.doStartTag(FileTag.java:268) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722) at cfForum2ecfc672310569$funcEDITPOST._factor5(\\121019-admin\s$\com\cypress\services\Forum.cfc:987) at cfForum2ecfc672310569$funcEDITPOST._factor6(\\121019-admin\s$\com\cypress\services\Forum.cfc:982) at cfForum2ecfc672310569$funcEDITPOST._factor7(\\121019-admin\s$\com\cypress\services\Forum.cfc:980) at cfForum2ecfc672310569$funcEDITPOST.runFunction(\\121019-admin\s$\com\cypress\services\Forum.cfc:976) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:490) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:336) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360) at cfeditpost2ecfm1427110115.runPage(\\121019-admin\s$\Cypress.com\3.0\modules\forum\editpost.cfm:4) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722) at cfforum2ecfm1574266689.runPage(\\121019-admin\s$\Cypress.com\3.0\apps\forum.cfm:119) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722) at cfindex2ecfm2051812796._factor1(\\121019-admin\s$\Cypress.com\3.0\index.cfm:29) at cfindex2ecfm2051812796._factor18(\\121019-admin\s$\Cypress.com\3.0\index.cfm:10) at cfindex2ecfm2051812796.runPage(\\121019-admin\s$\Cypress.com\3.0\index.cfm:1) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:348) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:87) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53) at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126) at coldfusion.CfmServlet.service(CfmServlet.java:201) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) |
TagContex |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you try to post your archive with ms internet explorer?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It worked!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content