Post Go back to editing

AD4195-4: ADC_CONV_ERR set after every zero-scale calibration, although the calibration result looks correct

Category: Hardware

Hello,

We're driving an EVAL-AD4195-4 over SPI from our own microcontroller rather than the ACE software. Every internal or system zero-scale calibration sets ADC_CONV_ERR (ERROR register bit 3), yet the offset it produces appears correct. We'd like to understand why, and whether the calibration can be trusted.

Setup
- ID registers: CHIP_TYPE 0x07, PRODUCT_ID 0x004C, CHIP_GRADE 0x04, SPI_REVISION 0x83.
- Supplies: seen with SW1 in position 1 (AVDD 5 V, AVSS GND) and in position 2 (AVDD +2.5 V, AVSS -2.5 V, LK21-LK28 removed).
- Internal oscillator, divide by 2 (CLOCK_CTRL 0x0000). Internal reference enabled (REF_CONTROL 0x0001).
- Every setup: AFE 0x0050 (REFOUT/AVSS, bipolar, gain 1), FILTER 0x0000 (Sinc5 + Avg), FILTER_FS 5000, MISC 0x0000. Each channel uses its own setup (CHANNEL_SETUPn = n).
- Per-channel data registers (ADC_CTRL bit 7 = 0), RDY on DIG_AUX1 (PIN_MUXING 0x0010), SPI CRC enabled, ERROR_EN 0x30BC.
- Channels tested: CH0 = AIN0/AIN1 (LK2 fitted) and CH3 = AIN7/AIN8 shorted with a jumper at J1.

Calibration sequence
1. ADC_CTRL = 0x0007 (idle)
2. CHANNEL_EN = the target channel only
3. Clear ERROR (write 1 to any set bits) and confirm it reads 0x0000
4. ADC_CTRL MODE = 1010 (internal zero-scale) or 1000 (system zero-scale)
5. Wait for RDY to go low (about 20 ms), then read ERROR and the channel's OFFSET register

What we see
- ERROR reads 0x0008 after every calibration we have run (more than 40).
- OFFSET is updated to a plausible, repeatable value (-122 to -126 across CH0 and CH3), consistent with each channel's uncalibrated reading of about -165 codes (-49 uV). Afterward the channel reads 0 +/-1 code.
- GAIN stays at 0x555555. A calibrated and an uncalibrated channel measuring the same internal (AVDD-AVSS)/5 input differ by 50 uV, i.e. by the removed offset only, so the gain path is unaffected.

What we have ruled out
- Normal conversions never set the bit: 1,000 continuous conversions across four channels, and 40 single conversions (MODE 0100) on the same isolated channels, all left ERROR at 0x0000.
- A deliberate over-range ((AVDD-AVSS)/5 at gain 4) does set ADC_CONV_ERR during continuous conversion, as documented.
- Timing: ERROR is still 0x0000 immediately after the calibration is triggered and about 10 ms into it. The bit is set by the time RDY goes low.
- It doesn't depend on: internal vs. system zero-scale; channel (CH0, CH3); FILTER_FS 5000 vs. 4; PGA gain 1 vs. gain 1 with precharge buffer; CHOP_ADC enabled (the resulting OFFSET is 0 and the bit is still set); the input pair floating vs. held at mid-supply by VBIAS; unipolar vs. bipolar supplies; whether we read registers while the calibration runs.
- The calibration doesn't change the channel's DATA_PER_CHANNEL register. STATUS CH_ACTIVE reads 0 afterward, while a single conversion on the same channel leaves it at 3.

Two related observations
- A second calibration triggered straight from the idle state the previous one leaves (writing MODE 1010 again with nothing in between) never completes: RDY stays high for more than 2 s. Writing ADC_CTRL = idle and rewriting CHANNEL_EN before each calibration avoids this.
- With FILTER set to Sinc3 (0x0006) and FILTER_FS 5000, ADC_CONV_ERR was set during continuous conversion of the shorted input. We saw this once and haven't investigated further.

Questions
1. Is ADC_CONV_ERR expected at the end of an internal or system zero-scale calibration? If so, what does it indicate?
2. Can the OFFSET produced by the calibration be trusted when the bit is set? Is there a recommended way to confirm that a calibration succeeded?
3. Is it required to re-enter idle and rewrite CHANNEL_EN before each calibration? Is this documented anywhere?

We can share register dumps or logs if helpful. Thank you!

Parents
  • Hi  ,

    Below are the answers to your questions.

    1. Is ADC_CONV_ERR expected at the end of an internal or system zero-scale calibration? If so, what does it indicate?

    ADC_CONV_ERR is intended to indicate saturation (overflow or underflow) of the ADC result when the conversion-error diagnostic is enabled. It is not described as a normal indication of calibration completion.

    2. Can the OFFSET produced by the calibration be trusted when the bit is set? Is there a recommended way to confirm that a calibration succeeded?

    ADC_CONV_ERR indicates that saturation (overflow or underflow) occurred during the conversion process. The datasheet does not specifically describe the validity of the resulting OFFSET coefficient when ADC_CONV_ERR is asserted during calibration.

    Ensure ADC_CONV_ERR remains clear during and after the calibration. After calibration completes, apply a known zero-scale input for that setup and read back data, the result should be close to the expected zero point using the updated OFFSET coefficient. From your observations, it appears that you are already using this method to confirm successful calibration.

    3. Is it required to re-enter idle and rewrite CHANNEL_EN before each calibration? Is this documented anywhere?

    ADC is placed in idle mode following a calibration. However, I have not found documentation stating that CHANNEL_EN must be rewritten before every calibration.

    Thanks,
    Francis

  • Hi Francis,

    Thanks for the answers. They confirm that we're verifying calibration the right way.

    The part that puzzles us is that ADC_CONV_ERR should mean saturation, but nothing in our setup appears to saturate:

    • Timing: the flag appears at the end of the calibration. ERROR is clear right after the trigger and still clear about 10 ms in; bit 3 is set when the calibration completes, about 20 ms in.
    • Frequency: it has happened on 40+ calibrations out of 40+, internal and system zero-scale, on channels 0 and 3.
    • Conditions tried: it doesn't depend on FILTER_FS (5000 or 4), gain 1 vs. precharge, unipolar vs. bipolar supply, the input floating vs. held at VBIAS, or SPI traffic during the calibration.
    • CHOP_ADC: with CHOP_ADC set, the calibration produced OFFSET = 0 exactly, and the flag was still set. It's hard to see what saturated there.
    • Result quality: the input is at or near zero-scale, and the resulting OFFSET is small and repeatable (−122 to −126 counts). After calibration the channel reads 0 ± 1 LSB, and the 49 µV it removes matches the offset we measured beforehand. GAIN is unchanged.
    • Normal conversions: 1000 continuous and 40 single conversions under the same conditions never set it.
    • Positive control: a genuine over-range, the (AVDD−AVSS)/5 channel at gain 4, does set ADC_CONV_ERR in continuous mode, so the diagnostic itself works as described.

    So this doesn't look like input saturation. We suspect something internal to the calibration sequence, such as an intermediate conversion or an internal configuration, is setting the flag.

    Could you check with the product or design team?

    1. Is there a known reason the zero-scale calibration sequence sets ADC_CONV_ERR, or an erratum for it?
    2. If a calibration's only flag is ADC_CONV_ERR and it passes the zero-scale readback check, is it safe to clear the flag and accept the OFFSET? That's what we do today, but we'd like confirmation before relying on it in production.

    On question 3, the reason we asked: a second calibration triggered from the idle state the first calibration leaves behind never completes. RDY stays high for more than 2 s. If we write ADC_CTRL to idle and rewrite CHANNEL_EN before each calibration, it completes every time. If that re-trigger behavior isn't documented either, it may be worth passing to the same team.

    Thanks,
    Matt

  • Hi Matt,

    Apologies for the late response. 

    Is there a known reason the zero-scale calibration sequence sets ADC_CONV_ERR, or an erratum for it?

    There are currently no known errata related to this behavior. The available documentation describes ADC_CONV_ERR as being associated with overrange or underrange conditions on the analog inputs, but does not indicate that it is expected during a zero-scale calibration.

    If a calibration's only flag is ADC_CONV_ERR and it passes the zero-scale readback check, is it safe to clear the flag and accept the OFFSET? That's what we do today, but we'd like confirmation before relying on it in production.

    As you noted, the calibration result appears valid based on the updated OFFSET coefficient and the successful zero-scale verification. However, I need to confirm this with the design team before recommending it for production use. I'll get back to you as soon as I receive additional information.

    Again, I apologize for the delayed response and will do my best to gather the necessary information as quickly as possible. This would possibly include question 3.

    Regards,
    Francis

Reply
  • Hi Matt,

    Apologies for the late response. 

    Is there a known reason the zero-scale calibration sequence sets ADC_CONV_ERR, or an erratum for it?

    There are currently no known errata related to this behavior. The available documentation describes ADC_CONV_ERR as being associated with overrange or underrange conditions on the analog inputs, but does not indicate that it is expected during a zero-scale calibration.

    If a calibration's only flag is ADC_CONV_ERR and it passes the zero-scale readback check, is it safe to clear the flag and accept the OFFSET? That's what we do today, but we'd like confirmation before relying on it in production.

    As you noted, the calibration result appears valid based on the updated OFFSET coefficient and the successful zero-scale verification. However, I need to confirm this with the design team before recommending it for production use. I'll get back to you as soon as I receive additional information.

    Again, I apologize for the delayed response and will do my best to gather the necessary information as quickly as possible. This would possibly include question 3.

    Regards,
    Francis

Children
  • Hi  ,

    Since you mentioned channels 0 and 3 in your configuration, just want to clarify during calibration, are you enabling both at the same time?

    Thanks,
    Francis

  • Sorry for the slow response, and thanks for getting back to me.

    We are only enabling a single channel during calibration, but we have tested calibration on each channel separately.

    The steps to perform an internal zero-scale offset calibration are as follows:

    1. Set ADC_CTRL to 0x0007 (idle)
    2. Set CHANNEL_EN to 0x0008 to enable channel 3 (or set to 0x0001 if calibrating channel 0).  Actual code is to set register to 1<<channel.
    3. Read ERROR register and clear any set bits (write 1 to clear)
    4. Read OFFSET register for enabled channel and report as "previous offset"
    5. Set ADC_CTRL register to 0x000A to initiate internal zero-scale offset calibration
    6. Wait for RDY pin to go low
    7. Read ERROR register.  So far, it always reads 0x0008 (ADC_CONV_ERR) with no other bits set.  We currently clear this error (write 1 to clear), but we don't understand why it is set.
    8. Read OFFSET register for enabled channel.  This is always small and repeatable (−122 to −126 counts).
    9. Resume continuous operation by setting CHANNEL_EN to 0xF (enabling channels 0, 1, 2, and 3), then setting ADC_CTRL to 0x0000 to resume continuous conversion mode.

    Each channel has its own setup (CHANNEL_SETUPn = n). AFE = 0x0050 (REFOUT/AVSS, bipolar, gain 1, precharge buffers, internal 2.5V reference). All register writes are verified by read-back, with SPI CRC enabled.

    Please let me know if you have any other questions.

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.