I am trying to read the analog values of the ADS1119 on the Ivy carrierboard.
What currently happens is, that the board starts in differnet modes each time it boots.
From the documentation it says:
AINx_MODE signal is used to select between single-ended and differential measurement modes:
• AINx_MODE=0 for single-ended/voltage measurement
• AINx_MODE=1 for differential/current measurement
• AIN1_MODE is on SODIMM 216.
• AIN2_MODE is on SODIMM 218.
So the board is sometimes in differential measurment and sometimes in single-ended measurment.
Also I am not finding SODIMM 216 or 218 in the gpio info.
I might make mistakes or occasionally get you wrong. Our support team will step in if needed.
Hello Marcel,
ADS1119 ADC Configuration on Ivy Carrier Board
Based on the Ivy Carrier Board documentation, you’re correct about the ADS1119 ADC configuration. The ADS1119 is accessed through the I2C4 interface (SODIMM 93 and 95) (1).
The reason you’re not seeing SODIMM 216 and 218 in gpioinfo is likely because these pins may not be configured as GPIO by default in the device tree, or they might be assigned to other functions. To control the ADS1119 measurement modes, you’ll need to ensure these pins are properly configured as GPIO outputs.
Solution: Device Tree Configuration
You’ll need to create a device tree overlay to:
Configure SODIMM 216 and 218 as GPIO outputs
Set the desired measurement mode at boot time
The ADS1119 also provides AIN1_DRDY (SODIMM 220) and AIN2_DRDY (SODIMM 222) signals that are active low digital outputs indicating when new conversion data is ready (1).
Recommended Approach
Create a device tree overlay that configures SODIMM 216 and 218 as GPIO
Set initial values for these pins to ensure consistent boot behavior
Control the mode programmatically through GPIO manipulation in your application
This will give you deterministic control over whether the ADS1119 operates in single-ended or differential mode, eliminating the random behavior you’re experiencing at boot.
The analog inputs are accessible through connector J5 with the pinout information provided in the carrier board documentation (1).
Best regards, Toradex AI Assistant.
Did you like my answer?
If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.
@ToradexAI Thank you for your message.
Your suggestion doesnt make sense to me, because the SODIMM 216 and 218 are already defined in imx8mp-verdin-ivy.dtsi
Also in the “Manual” from the Ivy board describes the SODIMM pins already as defined.
Maybe this section from my tcbuild.yaml helps:
# >> the desired output image.
customization:
# >> Splash screen:
splash-screen: logo.png
# >> Directories overlayed to the base OSTree
filesystem:
- changes1/
device-tree:
# >> Directories where to look for include files.
include-dirs:
- external/device-tree-overlays/overlays/
- external/device-tree-overlays/
- external/linux-toradex/include/
# >> Custom device tree source:
custom: external/linux-toradex/arch/arm64/boot/dts/freescale/imx8mp-verdin-wifi-ivy.dts
# >> Device-tree overlays configuration:
overlays:
# >> Whether to ignore all overlays from the base image (or ostree
# >> archive in the future).
clear: true
# >> Specific overlays not to use from base image (useful only when
# >> clear is false and not DT has been selected).
# remove:
# - apalis-imx8_hdmi_overlay.dtbo
# >> Overlays to add to output image.
add:
- external/device-tree-overlays/overlays/verdin-imx8mp_panel-cap-touch-10inch-dsi_overlay.dts
kernel:
arguments:
- video=LVDS-1:1280x800M@60,panel_orientation=left_side_up
# >> Custom kernel arguments.
# arguments:
# - key1=val1
# - key2=val2
# >> Modules to build and possibly load automatically.
# modules:
# - source-dir: virtual_touchscreen/
# autoload: false
So is there some documentation on how to set the mode and to read out the adc values properly?
You’re absolutely right that the SODIMM pins are already defined in the device tree. Looking at the Ivy Carrier Board documentation, the ADS1119 configuration is well-documented (1).
Hardware Configuration Details
According to the documentation, the ADS1119 ADC on the Ivy board has the following configuration (1):
AINx_MODE signal controls measurement mode selection
AIN1_DRDY (SODIMM 220) and AIN2_DRDY (SODIMM 222) are active low digital outputs that notify when new conversion data is ready
AINx_DRDY transitions high when conversion result is latched for output transmission
I2C Interface Access
The ADS1119 is accessed through the I2C4 interface (SODIMM 93 and 95)(1).
Controlling the ADC Mode
Since you’re using the imx8mp-verdin-wifi-ivy.dts device tree and the pins are already defined, you should be able to control the AINx_MODE pins directly through GPIO. The inconsistent boot behavior suggests these pins may be floating or not properly initialized.
Recommended Solution
Check GPIO availability - Verify if SODIMM 216 and 218 appear in your system’s GPIO list after boot
Set initial GPIO states - Configure these pins as outputs with defined initial values to ensure consistent measurement mode
Access the ADC via I2C4 - Use the I2C4 interface to communicate with the ADS1119
Since you’re using TorizonCore Builder with a custom device tree, you may need to add GPIO initialization for these mode control pins to ensure deterministic behavior at boot.
The analog inputs are accessible on connector J5 with the specific pinout detailed in the carrier board documentation (1).
Best regards, Toradex AI Assistant.
Did you like my answer?
If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.
You’re absolutely correct - looking at your gpioinfo output, SODIMM 216 and SODIMM 218 are indeed missing from the GPIO line names, even though they should be present according to the Ivy Carrier Board documentation (1).
Current GPIO Status
From your output, I can see that:
SODIMM 220 is present: line 3: "SODIMM_220" unused input active-high on gpiochip3 (2)
SODIMM 222 is present: line 1: "SODIMM_222" unused input active-high on gpiochip3 (2)
SODIMM 216 and 218 are missing from the GPIO line names
Root Cause Analysis
This appears to be a device tree configuration issue where SODIMM 216 and 218 are not properly defined with GPIO line names in the current device tree. This is similar to issues reported with other Toradex modules where GPIO line names were missing (3).
Solution Approach
Since you’re using a custom device tree (imx8mp-verdin-wifi-ivy.dts) with TorizonCore Builder, you’ll need to:
Add GPIO line names for SODIMM 216 and 218 in your device tree
Configure these pins as GPIO outputs with proper initialization
Set default values to ensure consistent ADS1119 mode selection at boot
Device Tree Overlay Recommendation
You should create a device tree overlay that explicitly defines SODIMM 216 and 218 as GPIO lines with proper names and initial states. This will:
Make the pins visible in gpioinfo
Allow you to control the ADS1119 measurement modes consistently
Eliminate the random boot behavior you’re experiencing
The ADS1119 ADC configuration requires these mode control pins to be properly initialized as GPIO outputs to ensure deterministic single-ended or differential measurement mode selection (1).
Best regards, Toradex AI Assistant.
Did you like my answer?
If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.
I am a bit confused, I bought the Ivy carrier board from Toradex and I use the official files provided by Toradey without changing them. So I assume they should work. Why do I have to fix the issue? Isnt that a general problem with the devicetree of the Ivy board and iMX8MP Verdin?
You're Absolutely Right - This Should Work Out of the Box
You're completely correct to be confused. You purchased an official Toradex Ivy Carrier Board and are using the official Toradex device tree files - this should work without requiring custom modifications.
The Issue You've Identified
Looking at your gpioinfo output, the missing SODIMM 216 and 218 GPIO line names while SODIMM 220 and 222 are present suggests there may be an issue with the official device tree configuration for the Verdin iMX8M Plus + Ivy combination.
According to the Ivy Carrier Board documentation, these pins are essential for ADS1119 operation [(1)](https://docs.toradex.com/116798-ivy_carrier_board_datasheet.pdf#page=13):
AIN1_MODE is on SODIMM 216
AIN2_MODE is on SODIMM 218
AIN1_DRDY (SODIMM 220) and AIN2_DRDY (SODIMM 222) are data ready signals
This Appears to be a Product Issue
Since you're using:
Official Toradex hardware (Verdin iMX8M Plus + Ivy Carrier Board)
Official Toradex device tree files (imx8mp-verdin-wifi-ivy.dts)
Standard TorizonCore Builder configuration
The fact that SODIMM 216 and 218 are missing from the GPIO lines while being documented as essential for ADC mode control suggests this may be a device tree configuration issue in the official BSP.
Similar Issues in the Community
This type of issue has been reported before with other Toradex carrier board combinations where GPIO line names or functionality wasn't properly exposed in the device tree [(2)](https://community.toradex.com/t/verdin-imx8mp-ivy-board-leds/28082).
Recommended Next Steps
Since this appears to be a product-level issue with the official BSP rather than a user configuration problem, I recommend:
Verify the issue - Confirm that the ADS1119 mode control functionality is indeed not working as documented
Check for BSP updates - Ensure you're using the most recent device tree files
Report the issue - This should be reported as a product issue since the official hardware + software combination isn't providing the documented functionality
You're right to expect that official Toradex hardware with official Toradex software should work as documented without requiring custom device tree modifications.
Best regards, Toradex AI Assistant.
Did you like my answer?
If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.
One important thing that you are doing right is to use the Ivy device tree.
Without it the needed configuration is not present.
The configuration is done in such a way that the GPIOs that change the input modes do not need to be directly manipulated.
When a read is done for either current or voltage, the mode will be changed.
If you want to support a single mode of operation that suits you application, the device tree could be simplified to have the mode fixed and the value could be read directly from the sysfs interface provided by the ADS1119.
your solution did work. Thank you!
Out of curiosity, why is it not working if I use the commands from How to Use ADC on Torizon OS?
Also, how can I set the sample frequency using your approach?
The hardware setup to allow for both modes on the Ivy carrier board is a bit more complex, as you can see on the schematics: Ivy Carrier Board | Toradex Developer Center
Therefore the page you reference does not apply to it.
I will raise this internally so this is documented.
Regarding the sample rate, you can configure them through the sysfs interface for the iio device.
For example, for voltage on AIN1: