MAX32665-MAX32668 User Guide
Maxim Integrated Page 376 of 457
Complete the following steps to perform an RTC calibration:
1. If not already, software configures and enables one of the compensated calibration frequencies as described in
section Square Wave Output.
2. Measure the frequency on the square wave output pin and compute the deviation from an accurate reference
clock.
3. Software clears RTC_CTRL.ready to 0.
4. Wait for RTC_CTRL.ready = 1 by:
5. Software sets RTC_CTRL.ready_int_en to 1 to generate an interrupt when RTC_CTRL.ready = 1, or
6. Software polls RTC_CTRL.ready until the field = 1.
7. Software polls until RTC_CTRL.busy=0 to make sure any previous operations are complete
8. Software sets RTC_CTRL.write_en to 1 to allow access to RTC_TRIM.
9. Software writes to RTC_TRIMregister as desired to correct for measured inaccuracy.
10. Hardware clears RTC_CTRL.busy =0.
11. Software clears RTC_CTRL.write_en to 0.
12. Repeat the process as needed until the desired accuracy is achieved
18.6 Registers
Refer to Table 3-1: APB Peripheral Base Address Map for this peripheral/module's base address. If multiple instances are
provided, each will have a unique base address. All fields in this peripheral are reset on POR only; refer to the field
description for details.
Table 18-4. RTC Register Summary