I have code like this…
[quote]Microsoft.SPOT.Hardware.PowerState.MaximumTimeToActive = new TimeSpan(TimeSpan.TicksPerSecond * 10);
Microsoft.SPOT.Hardware.PowerState.Sleep(SleepLevel.DeepSleep, HardwareEvent.SystemTimer | HardwareEvent.GeneralPurpose);[/quote]
My device does wake up when I press a key on my keypad, but it never seems to wakeup on the timer?!?
I wanted my device to use as little power as necessary. So I check for keypad activity and when there isn’t any I turn off my peripherals and jump to DeepSleep. As soon as the user touches any key the device wakes up and response. There isn’t a perceivable lag so from the user standpoint they have no idea what’s happening. This works great for my device.
…BUT then I added my watchdog code. Since I need to kick that regularly, I changed my Sleep call to wakeup on a timer. My thinking is that the device should wake up every 10 seconds or so to kick the watchdog and then return to deep sleep.
I’d imagine other people would want to use NETMF this way, so I thought maybe someone else had run into this issue?
As always your help is appreciated.
Does Microsoft.SPOT.Hardware.PowerState.Sleep work with the HardwareEvent.SystemTimer event on Cerb boards?