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 RTC Output Pin section for details.
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