SAMD21 wake up time from deep sleep

Hi Martin,

I changed the RTC setAlarmEpoch() method to use the non blocking technique and that appears to have eliminated the 6ms delay. The pulse width of my loop() is now about 6us which makes a lot more sense. For the moment this approach works since my RTC tick is 10s. This change appears to have exposed some sort of race condition with the I2C bus now. I'll post another message about that.

I haven't attempted the event method using the RTC periodic events yet. You mentioned in your earlier email that to sleep and wait for an event you need to use the WFE instruction. I was not yet aware of that detail, thank you for pointing that out. I am sure I would have banged my head over that for countless hours. :slight_smile: When I require a tick less than 1 second then I will need to use the event technique.

Steve