Home/Support/Support Forum/Issue with GPIO control (6UL Express)
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Issue with GPIO control (6UL Express)

0 votes
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?
asked Nov 26 in Linux by gzubkov New to the Community (3 points)
recategorized Nov 26 by rmaroun

Please log in or register to answer this question.

2 Answers

+1 vote
 
Best answer
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.
answered Dec 2 by LeonidM Veteran of the Digi Community (3,203 points)
selected 22 hours ago by gzubkov
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.
+1 vote
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
answered Dec 5 by smithclarkson1 New to the Community (4 points)
...