Hibernate with RealTimeClock Alarm and Domino

Hi,

2 weeks ago I upgraded to the newest SDK version (v4.1) and my hibernate functions stopped working now. I get the exception “An unhandled exception of type ‘System.InvalidOperationException’ occurred in GHIElectronics.NETMF.Hardware.dll” when I call this line of code:

RealTimeClock.SetAlarm(RealTimeClock.GetTime().AddSeconds(10));

Any help would be great.

Thanks!

Hi and welcome to the forums.

The most likely thing here is that you have an incompatible mix of SDK components.

Three things must match to be successful. The SDK version you have installed on your PC; the firmware version you have on your device (Domino in your case) and the DLLs in your project. So if you install a new SDK on your PC, you need to fix the other two. That means you have to follow rule #1 that you would have seen when you created this post (ie update the firmware on your device), and then either create a new project and copy your code over (the long way to achieve this) or remove the references from your project and re-add them (the quicker way).

Do a get time on its own. I think time is invalid in the RTC.

Hi,

thank you very much for the quick answer.

I don’t know what to say. I left my board untouched for a night, refactored the code a little and know it works. No idea what happened - I hate it when that happens :frowning:

Thanks anyway!

I know what happened. Time was set to a invalid time. Let say it was 3:80 so you got the exception but when you let it run fro a while, the minutes got reset to a good state…and so it worked the next day.