Hello,
I am experiencing the same issue as discussed on TI forum here. I am using Particle Xenon (nRF52840) running Arduino bootloader. I have the code running to write into CFR and read the data back, switching channel and then reading the data out. What the mentioned issue mentinos is that the data that is being read is shifted by 1 to the left e.g. when I try to read the CFR with SPI mode 1 (falling edge), I get response as 1111_1101_1111_1110 (0xFDFE), which is actually left shifted default value of CFR (0111_1110_1111_1111 = 1111_1101_1111_1110 >> 1). So then instead I used SPI mode 0 (rising edge) to read the CFR and it read back the default value 1111_1110_1111_1111 corrently. I then probed the SPI line with a digital signal analyser:
Note that the transfer is done byte-by-byte by keeping the CS low. What I observe is that the data on the MISO (SDO) is coming out WITH the falling edge of the clock (green dotted lines vs the red dotted line, which shows where the data should have changed instead). So if I read the data on the rising edge (SPI mode 0) instead of the falling (SPI mode 1), it reads the data correctly as 1111_1110_1111_1111. Now this all would make sense, except that:
1. The ADS8328 datahseet is claiming that this device is pushing data out on the rising edge and reading on the falling edge (SPI mode 1):
2. If I use SPI mode 0 for writing into CFR register, that fails, since when I read the data back, it comes reads back the default value. If I then use SPI mode 1 instead to write into CFR but read back from CFR in SPI mode 0, this works and I read the correct data e.g. I send 1110_0110_1111_1101 and read back 1110_0110_1111_1101 (while with SPI mode 1 this reads back as 1110_1101_1111_1010, so shifted to the left by 1, plus violating timing requirements, so sometimes data could be corrupted).
Taking all this in consideration it looks like the device pushes data out on the falling edge and reads the data on the falling edge too, which isn't really a standard as I need to write the data from the MCU using SPI mode 1, but read the data back using SPI mode 0. I would do that, but for some reason this doesn't work well when I try to change the channel from which the data is going to be sampled. If I used SPI mode 1 for both selecting the channel and then reading the data back, this works and only one channel is being sampled (although I am loosing a bit since the data is shifted to the left!). If however I use SPI mode 1 to select the channel but then read the data back with SPI mode 0, it continues to alternate the channel even though I am setting in CFR manual switching.
I am quite confused why does the device work the way it does and would like to hear some suggestions/guidance on how could I go around using it. If there is an alternative chip that works I wouldn't mind changing it, although I need 2 channels, single reference, single-ended ADC capable of 16-bit.