GPIO with boot2qt image

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Based on the context provided, it seems you are using the deprecated sysfs interface to control GPIOs on your iMX6ULL with the boot2qt image. Since the sysfs interface is deprecated and you don’t have libgpiod installed, you might face issues.

Here are a few steps you can take to resolve this:

  1. Verify Pin Multiplexing:
    Ensure that the pin SODIMM_76 is correctly muxed as a GPIO in the device tree. If the pin is not muxed correctly, it will not function as expected. You might need to modify the device tree to set the pin function to GPIO.

  2. Install libgpiod:
    If possible, install libgpiod on your boot2qt image. This library provides a more modern and reliable way to control GPIOs. You can check if libgpiod is available in your package manager or build it from source.

  3. Using sysfs:
    If you must use sysfs, ensure that the GPIO number is correct. For SODIMM_76 on the Colibri iMX6ULL, the GPIO number might be different. You can find the correct GPIO number by referring to the Colibri iMX6ULL datasheet and the carrier board schematic.

  4. Check GPIO Export:
    Ensure that the GPIO is successfully exported and that you have the necessary permissions to access the GPIO sysfs interface.

Here is a revised approach using sysfs, assuming the GPIO number is correct:

echo 69 > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio69/direction
echo 1 > /sys/class/gpio/gpio69/value

After running these commands, check the status of the GPIO:

cat /sys/class/gpio/gpio69/value

If the value is 1 and the LED does not turn on, there might be an issue with the hardware connection or the pin muxing.

  1. Debugging:
    Use the following command to check the status of all GPIOs:
cat /sys/kernel/debug/gpio

This will help you verify if the GPIO is correctly configured and if there are any conflicts.

If you continue to face issues, consider switching to a Toradex BSP that includes libgpiod for better GPIO management.

Please, also check if these links can help you solve your problem:

GPIO issues on Apalis iMX6 boot2qt 5.12.4.