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

Why can the first ADS8688 auto-scan sample be wrong on a 40 MHz controller board?

A multi-input board uses an ADS8688 with a controller referenced to a 40 MHz active oscillator. During diagnostics it reads one fixed channel and then returns to auto scan. The sequence appears to resume, but the first result is occasionally wrong while later results look normal. Check the chip-select window of the command that changes modes. Accepting the command and meeting the acquisition requirement for the first following conversion are distinct events. A driver that sends just the two command bytes can easily verify only the first.

Complete the mode-entry frame to qualify the first conversion

TI gives auto scan with reset as command 0xA000. Its timing diagram allows releasing CS after the command or after reading the frame data. For accurate acquisition and conversion of the first selected channel in the next frame, however, TI requires a complete thirty-two-clock command frame. The command itself uses the first sixteen clocks. Keep the remaining sixteen in the same CS window. Two controller transactions that automatically toggle CS cannot combine into that frame.

The result in the command frame still belongs to the input sampled at its beginning. The first auto-scan channel appears in the following frame. Set manual channel three and select channels one and four for automatic scan. Provide three distinguishable DC inputs. Capture the command frame and subsequent frames to verify the old channel followed by one, four, one, four. If a driver labels the current result channel one as soon as it sends the command, it can mislabel the record despite correct electrical framing. If the first following result is actually wrong, return to the entry-frame length.

The scan enable and channel power registers have separate functions. The channel-enable register is at 0x01. Bits one and four give 0x12 in this example. Verify the expected input ranges and channel power configuration as well. A device reset can restore a different set of enabled channels. Read back the actual settings during testing rather than assigning channel labels from an older software copy.

Separate clock count from switching duration

Suppose the serial peripheral divides the 40 MHz active oscillator by two. At 20 MHz, sixteen clocks take 0.8 µs and thirty-two take 1.6 µs, apart from CS and software delays. Completing the frame adds 0.8 µs of bit time compared with the short version. Slowing the clock does not turn sixteen edges into thirty-two. Count the edges under the physical CS-low interval rather than relying on queued bytes.

For a test issuing one frame every 5 µs, a stable two-channel scan yields about 200,000 results per second overall, or 100,000 per channel, assuming complete compliant frames. The example does not target the device's maximum. If results unexpectedly keep coming from the same channel, check whether software sends AUTO_RST every frame. TI states that doing so during auto scan restarts the sequence at the lowest enabled channel. Continue the existing mode with the documented no-operation behavior instead of repeatedly restarting it.

Prove that the first conversion belongs to its input

Capture a short sixteen-clock entry frame with a fixed known input, then repeat with a complete thirty-two-clock frame and correct labels. Save CS, SCLK, command and data. If the first sample recovers in the second test, change the preceding manual input and check whether the first auto result remains at the intended level. If both trials fail, check input range, reference and acquisition under steady auto scan as well. That distinguishes mode entry from an analog fault.

Retain a trace of a deliberate restart during steady auto scan. Just after selecting a higher channel, send one complete AUTO_RST command and capture the command frame and the next four frames. The next frame should return the lowest selected channel. If software labels differ from the trace, align the recorded frame index to the sample points and check for dropped buffer entries. A two-channel repeating pattern can conceal two lost results. Add a slowly changing test signal to the higher channel and preserve timestamps to identify missing samples.

Also look at the actual transfer-complete condition. A DMA callback may indicate delivery of a final byte to the SPI peripheral while some bits are still shifting. For manual CS control, use the peripheral's completed-wire condition. Measure the full edge count and hold time at the ADC. A replacement 40 MHz active oscillator can then be verified using the same manual-to-auto transition and known input patterns. The capture should show both an intact entry frame and the correct first channel.

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.