We are testing our fault monitoring of our signal and the converter works fine if we have the voltage coming in. But if we zero out the signal to force an error, the convesion on the ADC does not complete.
Here is our code for setting up the converter:
static void ADS7142Init(uint8_t address)
{
uint8_t buf[16];
uint8_t len = 0;
// Do a block write for register to be updated are incremented by 1
buf[len++] = BLOCK_WRITE_CMD;
buf[len++] = REG_ALERT_CHAN; // Start register address
buf[len++] = 0x03; // REG 0x34 Alert enabled for channels 0 & 1
buf[len++] = 0x00; // NOTE* Register 0x35 doesn't exist so setting it 0
buf[len++] = 0x00; // REG 0x36 Pre Alert count set to 1
buf[len++] = 0x01; // REG 0x37 Enable window comparator
// 44V high limit (44000 << 12)/52800 = D55 ceil to D60
buf[len++] = 0x60; // REG 0x38 Channel 0 High Threshold LSbs
buf[len++] = 0x0D; // REG 0x39 Channel 0 High Threshold MSbs
// 36V low limit (36000 << 12)/52800 = AE8 floor to AE0
buf[len++] = 0xE0; // REG 0x3A Channel 0 Low Threshold LSbs
buf[len++] = 0x0A; // REG 0x3B Channel 0 Low Threshold MSbs
// current limit to 2A (2000 << 12)/3300 = 9B2 ceil to 9C0
buf[len++] = 0xC0; // REG 0x3C Channel 1 High Threshold LSbs
buf[len++] = 0x09; // REG 0x3D Channel 1 High Threshold MSbs
buf[len++] = 0x00; // REG 0x3E Channel 1 Low Threshold LSbs
buf[len++] = 0x00; // REG 0x3F Channel 1 Low Threshold MSbs
buf[len++] = 0x00; // REG 0x40 Channel 0 Hysteresis
buf[len++] = 0x00; // REG 0x41 Channel 1 Hysteresis
I2CBlockWriteByte(address, buf, len);
// normal oscillator
ADSWriteSingle(address, REG_OSC_SEL, 0x00);
// REG 0x1C Channels 0 & 1 set for auto sequencing
ADSWriteSingle(address, REG_OPMODE_SEL, 0x06);
// REG 0x20 Channels 0 & 1 set for auto sequencing
ADSWriteSingle(address, REG_AUTO_SEQ_CHEN, 0x03);
// REG 0x24 Channel set for two channel, single ended
ADSWriteSingle(address, REG_CHANNEL_INPUT_CFG, 0x03);
// REG 0x28 Data format 12 bit followed by channel id
ADSWriteSingle(address, REG_DOUT_FORMAT_CFG, 0x01);
// REG 0x2C Pre alert data buffer mode
ADSWriteSingle(address, REG_DATA_BUFFER_OPMODE, 0x04);
// REG 0x1E Set SEQ_START to start conversion
ADSWriteSingle(address, REG_START_SEQUENCE, 0x01);
}