Specialist Supplier of Crystals & Frequency Control Componentssales@mecxtal.com.cn0755-26500570
MERLIN home / Rednote / System Validation and Replacement

Why does INA229 keep returning old data on a controller board with a 20 MHz oscillator?

An INA229 monitors a load on a board whose controller takes its timebase from a 20 MHz active oscillator. Firmware was changed to trigger every few milliseconds and read immediately. SPI replies are present, but the logged voltage and current barely move when the load changes. Verify that conversion completes before the read and that a repeated trigger did not interrupt it. Completing SPI access does not establish that new data reached the output registers.

A readable register does not establish a new measurement

TI sets shunt voltage, bus voltage and temperature conversion times independently. Enabled measurements occur in sequence. If averaging is enabled, the device repeats that sequence until it has taken the selected number of measurements, then updates the result. Budget all enabled inputs. Previous data remains readable and reading it does not accelerate the current conversion.

Suppose bus voltage takes 540 µs and shunt voltage takes 280 µs, with temperature disabled. Sixteen averages account for sixteen times the sum, or 13.12 ms nominal without additional conversion delay. Retriggering every 5 ms is substantially shorter than a complete measurement. The data sheet says writing the mode bits interrupts a conversion in progress and restarts it. The log can continue showing an earlier result. Prevent the premature retrigger and wait for conversion ready before reading. Five milliseconds corresponds to 100,000 periods of a 20 MHz controller reference, but those periods do not reveal the ADC's remaining work.

The ready flag lives in the diagnostic register. It sets after conversion and averaging finish. Reading that register clears it, and writing conversion configuration also clears it under the documented conditions. If both the alert handler and a measurement task independently read the register, one can consume the flag before the other sees it. Assign one path to read the flag and distribute the observed result. Save the trigger write, first observed ready status and later data read in the same trace. Repeated reads of a clear-on-read register should not be expected to return the same flag.

Energy accumulation has its own mode requirement

If triggered conversion was chosen to save power, check whether the product needs accumulated energy or charge. TI states that ENERGY and CHARGE are invalid in triggered mode because the device does not track elapsed time for accumulation. Use continuous conversion for the device's own accumulators. If the controller instead integrates intermittently sampled power, account for actual sample times, gaps and changes in load. That calculation is a separate measurement path.

A stable 12 W load for ten seconds gives a reference value of 120 J. Compare to an instrument over the same interval and consider shunt, supply, temperature and timing errors. The internal oscillator's room-temperature and full-temperature tolerances differ. Improving the host oscillator can improve the reference window used for comparison. The INA229 still uses its internal oscillator for conversion and accumulation. Record which timebase applies to the quantity being verified.

When synchronizing with another converter, check actual sampling times instead of aligning printed log lines. The conversion-delay field can move a starting point. TI notes that separate timebases will lose alignment over time. Capture an observable marker at startup and again after sustained operation. Start triggered and continuous tests from known conditions with the same load. If switching after accumulating continuously, mark where the earlier accumulation is no longer used.

The internal oscillator is nominally 1 MHz. The data sheet specifies ±0.5 percent at 25 °C and ±1 percent across the stated temperature range. For a scale comparison only, a host timing reference with a 30 ppm error changes a ten-second gate by about 0.3 ms, or 0.0036 J at 12 W. This does not remove device timing error or characterize the entire channel. Identify the instrument, host and internal accumulator timebases in the result.

For a stale-data test, deliberately change between two recognizable load levels across triggers. Save the first immediate read and the first read after ready for each cycle. Do not use incomplete reads to estimate the amplitude change. If both observations remain inconsistent with the load, inspect shunt configuration and range.

Retain an end-to-end trace of the old and new samples

Document the 20 MHz active oscillator, actual controller clock and SPI configuration for sample acceptance. Include enabled inputs, conversion times, averaging, the order of reading ready status and the time new data appears. Compare a run triggered too quickly with one that waits for ready. For continuous accumulation, keep a separate fixed-load comparison to a reference instrument. Those records distinguish insufficient wait from a measurement that completes but falls short of the system's energy requirement.

References

WeChat

MERLIN · TIMING COMPONENTS

Scan with WeChat to contact Sales

Add our WeCom contacts from your usual WeChat app.

On desktop, scan with your phone. On mobile, save the QR image and select it from your album in WeChat Scan.