Hi all,
At the second iteration in the example code below “Power.WakeUpInterrupt.RTCAlarm” does not seem to work. At least the MCU does not seem to wake up the after the second call to Power.WakeUpInterrupt.RTCAlarm. Do i need to reset a flag or ???
Any suggestions are welcome.
public static void Main()
{
// the led is used as feedback during testing of the code.
var led48Cntrl = new OutputPort(EMX.Pin.IO48, false);
var ledStatus = false;
RealTimeClock.SetTime(new DateTime(2010, 07, 30, 13, 31, 00));
var alarmTime = RealTimeClock.GetTime().AddSeconds(10);
while (true)
{
// toggle the led
ledStatus = !ledStatus;
led48Cntrl.Write(ledStatus);
RealTimeClock.SetAlarm(alarmTime);
Power.Hibernate(Power.WakeUpInterrupt.RTCAlarm);
// Do some work here .... assume it takes only 1 second....
alarmTime.AddSeconds(10);
}
}