Hi,
I was using the Low Power documentation (https://www.ghielectronics.com/docs/141/low-power) to test that feature on a FezCerb 40 II.
Struggled sometime with it because I was not seeing the alarm to wake up the board.
The cause for that is that DateTime.Now gives a different time of GHI.Processor.RealTimeClock.GetDateTime() unless they are previously synced.
One has to either set the RTC alarm using the RTC object itself:
RealTimeClock.SetAlarm(GHI.Processor.RealTimeClock.GetDateTime().AddSeconds(30));
instead of:
RealTimeClock.SetAlarm(DateTime.Now.AddSeconds(30));
or alternatively sync both clocks beforehand using
DateTime myTime = …
RealTimeClock.SetDateTime(myTime);
Utility.SetLocalTime(RealTimeClock.GetDateTime());
and then the original code that is using DateTime.Now will work.
I hope I was able to explain myself…
Cheers,