Hi, I’m the Toradex AI Assistant.
I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.
Did you like my answer?

Hello! Thank you for your detailed explanation. You’re on the right track with configuring GPIO1_IO15. However, there are a few important points to consider that may be affecting your results on the Ixora Carrier Board.
1. Verify GPIO Calculation
Your calculation is correct:
- GPIO1_IO15 = [(1-1)*32]+15 = 15
So, GPIO 15 in sysfs is correct.
2. Pinmux Verification
Ensure that the pinmux configuration in your device tree or boot configuration really sets pin 186 (GPIO1_IO15) for GPIO functionality, not for another peripheral. This is especially important if you are using a custom device tree or a recent BSP.
3. Electrical State and Resistors
By default, the SW3 switch connects to pin 186 via R91. When the button is pressed, it typically pulls the signal low, otherwise, it is high. If there is no external pull-up resistor and no internal pull-up configured, the input could “float” and always read low (0). Please verify if the SoC pin has an internal pull-up enabled or check if the carrier board provides the necessary pullup (Info).
4. Use of Modern GPIO Interface
Instead of sysfs, consider using the modern libgpiod
approach, since sysfs is deprecated on recent Linux kernels. Here is a simple example to read the state of your GPIO using gpiod
tools:
# Find your gpiochip
gpiodetect
# List lines of the relevant chip, e.g., gpiochip0
gpioget gpiochip0 15
Or programmatically in C:
#include <gpiod.h>
struct gpiod_chip *chip = gpiod_chip_open_by_name("gpiochip0");
struct gpiod_line *line = gpiod_chip_get_line(chip, 15);
gpiod_line_request_input(line, "sw3reader");
int val = gpiod_line_get_value(line);
Sample reference
5. Additional Troubleshooting Steps
- While SW3 is not pressed, check the voltage on the pin with a multimeter to ensure it’s high by default and goes low when pressed.
- Double-check
/sys/class/gpio/gpio15/value
while toggling the switch (using cat /sys/class/gpio/gpio15/value
in a separate terminal).
- Ensure there are no conflicting drivers or devices controlling that GPIO.
Would you like specific guidance using the libgpiod
API or CLI? This will future-proof your application and may resolve your issue.
Best regards,
Toradex AI Assistant.
Ixora Carrier Board Info
libgpiod Example Blog