Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 6814

Interfacing (DSI, CSI, I2C, etc.) • Interfacing with TI ADS7830 ADCs via CM4

$
0
0
Hi all,

I've like to be able to interface with a pair of TI ADS7830 ADCs via our CM4 (with Kernel v6.6.51) using IIO.
https://www.ti.com/lit/ds/symlink/ads7830.pdf

I've been following this guide to some extent:
https://www.electronicsfaq.com/2020/07/ ... er-on.html

I've enabled IIO as follows and I can see a folder under /sys/bus/iio.
$ sudo nano /etc/modules
- Add line "industrialio"

There are no blacklist entries under /etc/modprobe.d/raspi-blacklist.conf.

I've made a custom ADC overlay as one for the ADS7830 is not available by default under Raspbian with Kernel v6.6.51:
https://github.com/raspberrypi/linux/tr ... s/overlays
$ nano work/ads7830.dts

Code:

/* * TI ADS7830 multi-channel ADC overlay *//dts-v1/;/plugin/;/ {compatible = "brcm,bcm2835";fragment@0 {target = <&i2c_arm>;__overlay__ {#address-cells = <1>;#size-cells = <0>;status = "okay";ads7830@48 {compatible = "ti,ads7830";reg = <0x48>;};};};};
I've compiled this DTS file and moved the output into the overlays folder.
$ sudo dtc -@ -Hepapr -I dts -O dtb -o /boot/firmware/overlays/ads7830.dtbo /home/user/work/ads7830.dts

I've added an overlay to the config file for each
$ sudo nano /boot/firmware/config.txt
- Add line dtoverlay=ads7830,reg=<0x48>
- Add line dtoverlay=ads7830,reg=<0x49>

There should already be an IIO driver for the ADS7830 under Raspbian with Kernel v6.6.51:
https://elixir.bootlin.com/linux/v6.6.5 ... /ads7828.c

I see the devices under /sys/bus/i2c/devices as 1-0048 and 1-0049, and each of their names show as "ads7830".
Using "$ sudo i2cdetect -y 10" I can see a pair of devices at 0x48 and 0x49 as expected, however they do not show as UU, so they are not under driver control. There are no IIO device entries under /sys/bus/iio/devices.

Can anyone please advise how I can get the IIO drivers for these ADCs working?
Is this driver disabled by default, and if so how do I got about enabling it in the Kernel please (i.e. how to enable CONFIG_ADS7828)?
I've done Kernel configuration on Yocto before with standard and custom IIO drivers, but that's quite different as you build the Kernel anyway.

Many thanks,

Adam

Statistics: Posted by AdamWTracerco — Thu Apr 17, 2025 12:35 pm — Replies 1 — Views 59



Viewing all articles
Browse latest Browse all 6814

Trending Articles