21.4.1 Initialization
To initialize and run the RTC in basic 32-bit counter mode, follow these steps:
- Configure the mode of operation to 32-bit counter (CTRLA.MODE).
- Enable continuous read resynchronization of the counter and wait for the operation to complete (CTRLA.COUNTSYNC and SYNCBUSY.COUNTSYNC).
- Configure the counter value (COUNT.COUNT).
- Enable the Overflow interrupt (INTENSET.OVF).
- Enable the RTC and wait for the operation to complete (CTRLA.ENABLE and SYNCBUSY.ENABLE).
- Wait for the Overflow interrupt flag to be set when the RTC has overflowed (INTFLAG.OVF).
