Main Site Documentation

Unable to get fractional second hibernate periods


#1

I am trying to achieve a hibernate time of 1.5 seconds, but can only get the Panda II to hibernate in increments of one second. I’ve tried both AddSeconds and AddMilliseconds methods with no luck. For example the following code results in the led blinking at a 1 second interval not 1.5 seconds.

                    GHIElectronics.NETMF.Hardware.RealTimeClock.SetAlarm(RealTimeClock.GetTime().AddMilliseconds(1500));
                    bled.Write(false);
                    GHIElectronics.NETMF.Hardware.LowLevel.Power.Hibernate(Power.WakeUpInterrupt.RTCAlarm);
                    // blink LED on on wakeup
                    bled.Write(true);

Similarly any other entry for the milliseconds delay results in the next lower integer number of seconds. Any suggestions as to why?


#2

This is because the internal hardware only accepts seconds. The wake up is done by hardware.


#3

Thanks for clearing this up. A followup question though. The LPC23xx User manual references millisecond -range periodic interrupts in section 6.2.5, page 586. Specifically,

[quote]The CISS register provides a way to obtain millisecond-range periodic CPU interrupts
from the Real Time Clock.[/quote]

It looks like the longest achievable time is only 62.5 ms, but does this open up a possible path for coding a fractional second RTC wake up from power down mode?


#4

Maybe possible. We can look into it in future but the idea from sleep on RTC is to let the system save power for few minutes. We never imagined the need to sleep for fraction of a second.


#5

Your patience in answering this odd question I appreciate.

The fractional second need comes from a system that is analyzing an event that may last only a few seconds. Power off of course saves battery life but the trade off is determining when data is compromised because the sleep time is too long. Depending on how long the system is active (80 ma draw) to how long it hibernates (8 ma draw) power savings can be substantial. That said, I think it may be time to just get a bigger solar panel as a more robust solution.

Thanks again for your help.


#6

You know you can wake up through an IO so you can somehow get a wake up signal externally. Maybe it can be a simple RC circuit.


#7

Good idea - I’ll look into it.