I am working on a project using a data acquisition device with a very high sample rate (10k-30kHz). However, the device is time-agnostic and the actual sample rate often has a small amount of error compared with the reported sample rate, so I'd like to estimate the actual sample rate. I want to know if I can use the DS3231 RTC to send an oscillating signal from the SQW pin to the DAQ device, so that I can take two signals which are a known time apart (by counting the number of oscillations between them), find the number of samples between these two signals, and given a known time and number of samples calculate a sample rate. I read on the DS3231 data sheet that it's accuracy is +/-2 ppm. I'm only concerned with how well it can keep time over the course of 60 mins at max, so that would be accuracy within +/-7ms/hr. For me, this is a workable level of accuracy.
My main questions about the RTC are about how the SQW pin functions as I'm pretty unfamiliar with this kind of device. Am I right in that I can expect an error of about max ~7ms per hour? Also, is the 1Hz signal that is generated on the SQW pin as accurate over this duration? And finally, how accurate is the timing between the individual SQW oscillations? Is the 2ppm accuracy something that only emerges at long timescales, or is the time between consecutive square wave pulses reflective of this accuracy as well?
Thanks