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.

ADS124S08: Why ADC driver(ti-ads124s08.c) uses different values for start and stop conversations other than datasheet?

Part Number: ADS124S08

Hi,

Driver:

https://github.com/torvalds/linux/blob/master/drivers/iio/adc/ti-ads124s08.c

API:

ads124s_read_raw

Line: 

233

For start and stop conversation, the driver uses the following values:

#define ADS124S08_START_CONV 0x01

#define ADS124S08_STOP_CONV 0x00

But as per the datasheet, expected values are:

#define ADS124S08_CMD_START 0x08

#define ADS124S08_CMD_STOP 0x0a

So, can anyone please let me know the reason behind this?

  • Hi Rakesh,

    Welcome to the E2E forum!  There are two methods for starting/stopping conversions.  One is by hardware (GPIO pin to START/SYNC pin of the ADS124S08) and the other by command.  Looking at the ti-ads124S08.c file you will see that both are included in the file.

    As to lines 233, 247, etc., you are correct that the wrong macro was used.  Replace the call to use the CMD macros for those function calls.  This is assuming that the START/SYNC pin of the ADS124S08 is tied or held low.

    Best regards,

    Bob B

  • Following are the correct commands.

    #define ADS124S08_CMD_START 0x08

    #define ADS124S08_CMD_STOP 0x0a