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.

ADS1258: ads1258 spi driver

Part Number: ADS1258


Can i get ads1258 driver source code for linux based architecture using spi-interface ?

  • Hi rnd,

    We have ADS1258 Example C Code (Rev. A) which provides a kind of generic driver with a hardware abstraction layer (HAL). It's not directly Linux compatible and you would still need an SPI host device with Linux drivers to communicate with the ADC; however, if you have such a peripheral with Linux APIs, then you should be able to modify the example code to work with most any hardware.

    Are you running Linux on a microcontroller, or some other processor, with a built-in SPI peripheral, or do you have some other host adapter which acts as the SPI master device? 

  • As an example, you might need something like this to act as the SPI master device:  https://www.totalphase.com/products/aardvark-i2cspi/.

  • Hi Chris,

    Thanks for the response,I am using customized linux device which has master SPI driver.I need to interface ads1258 as slave to my SPI master.Where i has spi connections(clk,mosi,miso,cs) to integrate ads1258,For this, is their any chance of getting ads1258 driver(slave).

  • Hi rnd,

    Do you have any documentation for your SPI master that you can share? Our group is looking into what it would take to make Linux drivers for our products, and it would be helpful to know more about your particular SPI master devices. I only have experience with SPI communication via embedded programming and I would expect SPI master devices on Linux to be just as diverse as microcontrollers, where no one code driver would be able to run on every microcontroller. Hence you may need to modify the ADS1258 Example C Code (Rev. A) to work with your specific hardware.

    If you have the ability to send and receive SPI data using your SPI master device, then should be able to modify these data bytes to implement the various ADC functions (read register(s), write register(s), read data, etc). The "ADS1258 Example C Code (Rev. A)" and the "Command and Register Definitions" section in the datasheet should be able to help you build up these command bytes.