Issue with GPIO control (6UL Express)

Hi, when I’m changing value of GPIO3_IO05 it doesn’t change actual signal on the pin, although if I do the same with GPIO3_IO06 everything works correctly. What might be different for these two GPIO port?

search for the pin on the SBC express schematics first. You will find that the pin is labeled PWM1/I2C3_SDA. Which should be the first hint.

Next search HRM:
https://www.digi.com/resources/documentation/digidocs/90001520/#reference/cc6ul/sbc_express/r_expansion-header_starterboard_cc6ul.htm?Highlight=pwm1
Expansion connector

27 PWM1/I2C3_SDA_PROT i.MX6UL PWM1_OUT/CPU I2C3 Bus Data

Finally, search the guide:
https://www.digi.com/resources/documentation/digidocs/embedded/dey/2.6/cc6ul/bsp_r_pwm_6ul

The following external pads are configured as PWMs on the default device tree:

On the ConnectCore 6UL SBC Express expansion connector:

Pad Signal PWM
27

PWM1/I2C3_SDA_PROT

PWM1

So, the default device tree configures this pin as PWM and thus you can’t use it as GPIO until you modify the device tree properly.

1 Like

Thank you for your prompt response.

But if I work with GPIO3_IO06, which is PWM2/I2C3_SCL it works correctly as gpio. What is the difference between these two pins then?

Thanks and best regards,
Gennady Zubkov

The difference is in how this pin is defined in the device tree. This particular pin is configured as PWM:
The following external pads are configured as PWMs on the default device tree:

On the ConnectCore 6UL SBC Express expansion connector:

Pad Signal PWM
27

PWM1/I2C3_SDA_PROT

And the one you mention GPIO3_IO06 - is not.

On the ConnectCore 6UL system-on-module:
Many of the i.MX6UL GPIOs are available at the system-on-module, multiplexed with other functions (labeled GPIOx_IOy where x is the port and y is the GPIO pin). See Hardware reference manuals for information about GPIO pins and their multiplexed functionality.
Eight MCA GPIO pins are available (labeled MCA_IOx where x is the GPIO pin).
On the ConnectCore 6UL SBC Pro board, an I/O Expander chip features up to 39 GPIO pins (multiplexed with Analog-to-Digital Converter (ADC) functionality). See I/O Expander GPIO for additional information on I/O Expander GPIOs. The GPIO connector allows direct access to several i.MX6UL GPIOs, MCA GPIOs, and I/O Expander GPIOs.
On the ConnectCore 6UL SBC Express, the expansion connector allows direct access to several i.MX6UL GPIOs and MCA GPIOs.
On the ConnectCore 6UL SBC Express and SBC Pro boards, GPIOs are used for many purposes, such as:
Power enable line for transceivers
Reset line for controllers
LCD backlight control
Interrupt line
User LED
User button

1 Like