A timing instrument using the TDC7200 has its 8 MHz active oscillator within frequency limits. One pulse generator drives the interval under test. The time calculated by the host is slightly higher than an offline calculation from the same registers, and the discrepancy grows with the interval. An accurate timebase remains necessary. This particular pattern also calls for checking whether the software threw away a fraction in the two-point calibration calculation.
Account for both calibration intervals
The TDC7200 uses an external clock to estimate the duration of an internal count. The first calibration reading corresponds to one external clock period. The second reading corresponds to a programmable number of periods. Subtracting the first count from the second removes shared fixed timing contributions to the extent they are common. If the second interval is ten periods, the difference covers nine. Divide the difference by nine to obtain internal counts per external clock period, then divide the external period by that count to obtain the duration of an internal count.
Start with Measurement Mode 1. Keep the input interval inside its specified operating range. Multiplying TIME1 by the calibrated time per count gives the interval to the first stop. Mode 2 adds a coarse external-cycle count and uses separate fractional terms from the start and stop. Fixing the mode prevents a mode change from confusing an arithmetic diagnosis. Keep calibration from the relevant measurement with each raw record instead of reading it once at power-up and reusing it everywhere.
Consider an illustrative record. The nominal period of the 8 MHz active oscillator is 125 nanoseconds. CALIBRATION1 is 2,000 and CALIBRATION2 is 21,699, giving a difference of 19,699. Ten periods in the second reading imply an average of 2,188 and seven ninths. Divide 125 nanoseconds by this value to obtain approximately 57.1095 picoseconds per count. At TIME1 equal to 6,500, the interval is approximately 371.212 nanoseconds. These register counts are arithmetic examples, not measurements from a production device.
An integer variable storing the first division reduces the average to 2,188. The same TIME1 now gives about 371.344 nanoseconds, roughly 132 picoseconds high or 355 parts per million. Displaying the final number in picoseconds gives an impression of precision after the calculation has lost it. One way to retain the fraction is to use sufficiently wide integers to multiply TIME1 by nine and the clock-period numerator, then divide by the calibration difference and round only once at output. Verify the period unit and maximum intermediate values in firmware.
Replay the exact same raw records
Apply at least two known intervals and repeat each one. Keep pulse levels and widths suitable for the selected mode, and align the measurement reference planes of the generator channels. Wait for completion on INTB before reading the status and raw registers. TI cautions that polling the status register while waiting can disrupt a measurement. Save CONFIG2, both calibration counts, TIME1, and error flags from the same cycle. Keep intermediate values directly instead of reconstructing them from the final display or combining readings across cycles.
Replay those registers offline with a high-precision formula. If the discrepancy nearly disappears when the calibration difference divides evenly and grows with the remainder, investigate integer division and unit conversion. Turn several raw records into regression cases. Include zero remainder, a remainder near the divisor, and both short and long allowed intervals. Include a record near the allowed numeric bounds to catch intermediate overflow when multiplying before division. Verify internal values before display rounding even when the product shows few digits.
If offline and shipped calculations always match but both differ in proportion to the interval, return to the clock input. Measure the period at CLOCK and verify which period the formula uses. If the 8 MHz active oscillator is twenty parts per million fast but the program assumes nominal period, the illustrative 371-nanosecond reading has a scale error of about 7.4 picoseconds. That is well below 132 picoseconds from premature truncation. With valid configurations, applying two known reference periods while preserving the input interval offers another scale test.
If a record has a zero or apparently negative calibration difference, stop that conversion and check read width, timeout status, and whether the values belong to the same cycle. Flag the record on its own so an invalid result never enters the average.
Let the error pattern determine the repair
A nearly constant shift when changing generator leads or input thresholds suggests checking probe and pulse-edge timing. An error that changes with the division remainder after changing CALIBRATION2_PERIODS suggests firmware arithmetic. If offline and instrument results change together with the measured reference period, assign that scale error to the reference budget. This makes oscillator purchasing decisions follow measured behavior.
Keep the test interval, reference period and its origin, both calibration counts, computation units, rounding rule, and allowable system error in the acceptance record. A reviewer can replay the measurements without dismantling the board. A result can still be expressed in picoseconds while clearly separating displayed resolution, repeatability, and the error supported by test evidence.
