GPIO2_IO05 confusion (MM_CD)

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

Did you like my answer?

:+1: :-1:


The discrepancy between the GPIO alphanumeric to numeric assignment and the datasheet could be due to differences in how GPIO banks and lines are enumerated between the SoC and the Linux kernel. For example, the Apalis iMX6 starts enumerating GPIO banks with 1, while GPIO banks in Linux always start at 0. This means that GPIO2_IO6 on Apalis iMX6 is GPIO bank 1 line 6 on Linux.

To enable a specific pin, you need to ensure that it is correctly muxed as a GPIO in the device tree. If the pin is not muxed as a GPIO, it will not function as expected. You may need to create a custom device tree overlay to set the pin’s functionality to GPIO if it is not already configured as such. This involves checking the device tree files to ensure the pin is not already in use by another peripheral and modifying the pin control settings accordingly.

If the pin is already in use by another peripheral, you will need to disable that functionality in the device tree to avoid conflicts. If you are using Torizon, you can use the TorizonCore Builder Tool to create and apply device tree overlays without external cross-compilation.

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

How to enable pins as GPIO.