With an 8.192 MHz master clock and OSR 128, requesting positive 100 for channel phase calibration on ADS131M04 is clipped to positive 63 modulator cycles. This is not oscillator drift or an inability to encode 100 in the ten-bit field. The oversampling setting imposes a narrower valid range. Read back the operating settings, calculate from the modulator rate, and verify the actual compensation against channel data and the input waveform.
1. Use the modulator period, not the oscillator period
The master clock enters CLKIN, but PHASEn uses modulator clock cycles. In the nominal high-resolution configuration, 8.192 MHz gives a 4.096 MHz modulator rate. One step is approximately 244.14 ns. Inverting the master clock directly yields about 122.07 ns, off by a factor of two. Keep separate worksheet columns for master clock, modulator rate, oversampling ratio, and step duration.
| Item | Meaning in this example |
|---|---|
| CLKIN | Nominal 8.192 MHz master clock at the ADC |
| Modulator rate | 4.096 MHz, which defines the phase step |
| Request positive 100 at OSR 128 | Encodable, but outside the active range |
| Applied positive maximum | Positive 63, approximately 15.38 µs |
At OSR 128, divide 4.096 MHz by 128 to obtain a nominal 32 kSPS and 31.25 µs between output samples. The output sample period and modulator period are separate. One phase step does not shift an entire output sample or change the master clock. Do not treat the interrupt interval as the unit of phase correction.
2. A readable register does not prove the applied shift
PHASEn is a ten-bit two's-complement value. A simple data-type check accepts positive 100, but the device clips the setting to the nearest limit for the current OSR. The valid range at OSR 128 is negative 64 to positive 63. Do not check it as an absolute value of 64 on both sides. At OSR 256 the range is negative 128 to positive 127. From OSR 1024 upward, the table stays at negative 512 to positive 511 rather than growing with each setting.
Distinguish requested and applied compensation
Positive 100 represents about 24.41 µs in this example, while the applied positive 63 represents about 15.38 µs. The difference is approximately 9.03 µs. For a 50 Hz sine wave, multiplying 360 by the signal frequency and the difference in seconds yields about 0.163°. That translates a time difference to an angle; it is not an energy-meter accuracy result. Actual error depends on sensors, analog channels, operating conditions, and the system calculation. A phase change is not the same percentage of power error.
Validate against the OSR before writing, and record requested and effective values separately. Do not treat the raw register text as a waveform measurement. Compare two channels with a common, known stimulus before and after adjustment. Try an unmistakably in-range positive value to check direction before applying the target correction. Different software sign conventions for leading and lagging cannot then silently reverse the intended calibration.
3. Increasing OSR to avoid clipping has other consequences
Changing OSR from 128 to 256 at the same master and modulator frequencies makes positive 100 valid, but lowers nominal output rate from 32 kSPS to 16 kSPS. Recheck filtering and the data capture rate at the new operating point. If the application must retain its sample period, do not change OSR solely to make a register write valid. Consider compensation range, sample rate, noise, and allowable delay together.
Split a shift larger than half a sample between host and ADC
For OSR below 2048, TI describes assigning whole-sample shifts to host-side indexing and the remaining fractional shift to hardware. That does not make every fraction exactly representable. Check phase-step size, limit asymmetry, and rounding. Re-indexing also changes samples paired across channels, so handle the beginning of a buffer, gaps, and the boundary after resynchronization. A timestamp label alone does not confirm that the intended voltage and current samples are used together.
Lowering the clock to gain a longer step requires checking the applicable power mode and clock input requirements. Even when the new frequency is nominal for another mode, sample rate, filtering, and delay do not necessarily carry over. A CMOS family such as Epson SG-210STF provides a starting point. Its family range covering 8.192 MHz does not qualify an exact order code, logic level, or availability. Check the actual part specification; a passive two-pin crystal does not itself provide digital drive to CLKIN.
4. Changed interrupt timing is not necessarily another lost sample
DRDY can be tied to the most lagging channel, the most leading channel, or any channel with a new result, depending on configuration. Changing phase settings or DRDY_SEL can move the interrupt. That is not direct evidence of clock instability. Mark which channel controls the interrupt and identify sample ownership in the data before comparing configurations. In global-chop mode, TI says phase calibration is automatically disabled and DRDY_SEL changes have no effect. Do not compare captures from those different modes as if the conditions were unchanged.
Where practical, record master clock, DRDY, and a common stimulus reference together across multiple sample intervals. A single displaced interrupt cannot distinguish effective calibration, a changed trigger choice, resynchronization, or incorrect host pairing. Standardize the compared channels, rates, and triggers first.
5. Keep two sets of evidence for release
Record the full oscillator part number, observed CLKIN, power mode, nominal modulator rate, OSR, requested phase, active limit, and timing calculation. Keep before-and-after waveforms, trigger choice, final software alignment, and test conditions. If calibration must survive a power cycle, verify that startup reloads the settings instead of relying on values left by a bench tool. Repeat qualification after a component or firmware change; seeing 8.192 MHz again is not a release criterion by itself.
Use separate settings to test the clipping boundary. With stimulus and capture held constant, compare positive 62 and 63 to see whether the last step is discernible, then try positive 64 and a larger request to check whether measured shifts level off at the same limit. Record long enough to reduce reading variability. If the instrument cannot resolve one step, log the measurement limit without claiming the ADC did not respond. Test the negative boundary separately, and record which channel is the zero-phase reference. Recheck sign and indexing if channel numbers are swapped.
The oscillator supplies the timing reference, the modulator period sets step size, and OSR sets the range. Verify the measured channel relationship after checking all three.
