RTC is clocked by a 32.768 kHz clock. More...

Please note the manual of your MCU or SiP for the clock setting for the RTC module. After initilization Time Seconds Register (TSR) increments once a second. The TSR (also TAR) value will be converted to the stuct tm and back with the help of stdlib functions that are defined in time.h. The driver supports alarm, it is stored in the Time Alarm Registers (TAR) and the unit is seconds.

RTC Configuration Example (for periph_conf.h)

#define RTC_NUMOF           (1U)
#define RTC_DEV             RTC
#define RTC_UNLOCK()        (SIM->SCGC6 |= (SIM_SCGC6_RTC_MASK))

Optional settings:

#define RTC_LOAD_CAP_BITS   0