![Maxim Integrated MAX32660 User Manual Download Page 100](http://html1.mh-extra.com/html/maxim-integrated/max32660/max32660_user-manual_1744484100.webp)
MAX32660 User Guide
Maxim Integrated
Page 100 of 195
9.4
RTC Output Pin
The RTC is capable of outputting the raw 4KHz signal or a trim compensated 1KHz or 512Hz signal to the 32KCAL alternate
pin function. On both the 16 WLP package and the 20 TQFN package for the MAX32660 the 32KCAL is alternate function 2
on pin P0.2. P0.2 corresponds to GPIO0[2].
9.5
RTC Calibration
The uncompensated accuracy of the RTC is a function of the attached crystal. A digital trim facility allows the device to
compensate for up to ± 127ppm (parts per million) as designated by the
RTC_TRIM
.trim
register field.
Complete the following steps to measure a square wave output on the 32KCAL alternate function pin and determine the
accuracy of the RTC:
1.
Enable the 32KCAL alternate function. Refer to the
2.
Set the
RTC_CTRL
.freq_sel
field to the desired output frequency.
3.
Set
RTC_CTRL
.32kout_en
to 1, enabling the square wave output on the 32KCAL alternate pin function.
4.
Measure the square wave output and compare it to an accurate reference clock.
5.
Set
RTC_CTRL
.write_en
to 1 and adjust the
RTC_TRIM
register.
6.
Repeat steps 1 through 5 as necessary until optimum accuracy is achieved.
9.6
RTC Registers
The RTC base peripheral address is 0x4000 6000. Refer to
Table 3-1: APB Peripheral Base Address Map
for the addresses of
all APB mapped peripherals.
Table 9-1. RTC Registers, Offsets and Descriptions
Offset
Register
Access
Description
[0x0000]
R/W
Seconds Counter Register
[0x0004]
R/W
Sub-Seconds Counter Register
[0x0008]
R/W
Alarm Time-of-Day Register
[0x000C]
R/W
Sub-Second Alarm Register
[0x0010]
R/W
Control Register
[0x0014]
R/W
Trim Register
[0x0018]
R/W
Oscillator Control Register
9.6.1
RTC Register Details
Table 9-2: RTC Seconds Counter Register
RTC Seconds Counter Register
RTC_SEC
[0x00]
Bits
Name
Access
Reset
Description
31:0
rts
R/W
-
Seconds Counter
This register is the 32-bit count of seconds.