I need clarification on exactly what the CH_SCAN register controls on the chip. Specifically are conversions only occurring for channels FIRST_CH through LAST_CH? For example, if I set CH_SCAN to 0xD8 (ScanMode3, LAST_CH=CH3, FIRST_CH=CH0), would ADC_DOUT ever contain results from a conversion on say CH 5?
In the example below, I've setup the chip to controlled streaming mode as described in https://e2e.ti.com/support/data_converters/precision_data_converters/f/73/t/525372#pi318173=1. However, frequently when I go through the loop to read in the converted data, ADC_DOUT contains conversion results for channels other than FIRST_CH through LAST_CH.
for (int ii=0; ii<100; ii++) {
popr1[ii] = spi_rw(SPI1, pushr); // 16 bit frame => popr1 contains ADC_DONE & SENDIAG_FLAGS (0x18 - 0x19)
CHAN = (popr1[ii]>>8) & 0x7;
if ((popr1[ii] & 0xFF) != 0xFF) { // Conversion ready!
popr2[ii] = spi_rw(SPI1, pushr); // 16 bit frame => popr2 contains ADC_DOUT (0x1A - 0x1B)
ADCH = popr2[ii] & ADC_OUTH_SHIFT;
ADCL = popr2[ii]>>8;
}
}