This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS1298: ADS1298 SPI CS

Part Number: ADS1298

I came across with this issue that the ADS1298 requires at least 4 clock cycles after the 8th bit is clocked in for the chip select pin to go inactive (link below is a closed thread without answer on the same matter).

When using the TMS320C55xx devices, the chip select goes inactive after 0.5tc-2ns where tc is the spi clock period. The condition to read the ADS1298 is only met when the spi clock is less than 250KHz which is quite useless as you cannot do much with that speed (not even sure you can achieve a 1ksps speed)...

So the solution to this is incrementing the time after the last clocked bit until the chip select goes inactive. The ADS resets buffers when the chip select goes inactive (I think, and I think this is why it needs 4 clock cycles to decode the message before deleting the buffer).

The way I managed to solve this was to send a dummy bit at the end of the command. So now to write a command to the ADS I send a 2 characters frame, one with 8 bits that clocks out the command and one of 1 bit. This keeps the chip select inactive for longer and the ADS does not get confused (this may be because the extra bit gets ignored as the chip select is pulled inactive immediately afterwards).

There it is, now everything works like a charm. Just wanted to post this because it took me a good while to realise what the problem was and then a few hours to resolve. I think it is a bit stupid that two very popular devices from the same manufacturer have such compatibility issue. Hope this gets looked at.

  • Hi Jaime,

    Thanks for your post. Could you reattach the link to the related thread that you mentioned?

    I have to say this is the first time I've heard this complaint. I assume you are trying to use the /CS pin in the native SPI peripheral (FSX)? Without knowing much about that DSP, I have run into issues with other MCUs where you do not have full control over when that /CS pin is goes inactive. Sometimes it returns inactive after each byte transfer, which you will not be able to do with a lot of ADCs that use multi-byte SPI commands or data words.

    On our ADS1298ECGFE-PDK, we used a GPIO (GPIO6 on the C5509) pin to toggle /CS manually. That allowed us to hold /CS low throughout an entire SPI command sequence or during data retrieval and insert any necessary delays before returning /CS high. For high-speed applications, you may not have enough processor speed to do this, but for applications using the ADS1298, that is perfectly fine.

    FYI - for 8 channels at 1 kSPS (CLK = 2.048 MHz), the required SCLK frequency is only 216.423 kHz per equation (7) in the datasheet.

    Best Regards,