SLAU723A October 2017 – October 2018 MSP432E401Y , MSP432E411Y
The RTC Calendar function is selected by setting the CALEN bit in the HIB Calendar Control (HIBCALCTL) register. In this mode, six 32-bit registers provide the read (HIBCAL0/1), match (HIBCALM0/1), and load (HIBCALLD0/1) interface. The standard RTC registers: HIBRTCC, HIBRTCLD, HIBRTCSS, and HIBRTCM0 are disabled when the calendar function is enabled and read back as all 0s in this mode. In addition, writes have no effect on these registers when the calendar function is enabled.
The Hibernation Calendar n (HIBCALn), Hibernation Calendar Match (HIBCALMn) and Hibernation Calendar Load (HIBCALLDn) register fields are written or stored in hexadecimal. When reading the Hibernation Calendar n (HIBCALn) registers, the status of the VALID bit in the HIBCAL0/1 register must be checked to ensure the registers are in sync before reading.
The calendar function will keep track of the following:
The hours may be reported with AM/PM or 24-hour based on the CAL24 bit in the HIBCALCTL register. The leap year compensation is handled within the calendar function. The number of days in February are adjusted to 29 whenever the year is divisible by four.