Not able to change value in some GPIO pins

Started by Numtem, February 09, 2018, 01:53:57 PM

Previous topic - Next topic

Numtem

I have a Debian linux installed in my Olimex IMX233 in Kernel 3.12.
But with this new kernel version i'm facing a new issue. I´m not able to change some of the GPIO pins that i already had implemented with the original Arch linux distributed in the Olimex site.

root@arm:/sys/class/gpio/gpio0# cat /sys/kernel/debug/gpio
GPIOs 0-31, platform/gpio.0, gpio.0:
gpio-0 (sysfs ) out hi
gpio-1 (sysfs ) out lo
gpio-2 (sysfs ) out lo
gpio-3 (sysfs ) out hi
gpio-4 (sysfs ) out lo
gpio-5 (sysfs ) out lo
gpio-6 (sysfs ) out lo
gpio-7 (sysfs ) out lo
gpio-17 (usb0_vbus ) out hi
gpio-20 (sysfs ) out hi

I´m able to change the direction of all pins but not the value of GPIO0,3 and 20. That are always at 1.
Can you please help me to understand why this beauvoir?

lambda

I can't think of a reason why changing the kernel version would break this.

My guess: Your external circuit is stronger then the imx233 - by default the imx233 drives the pins with 4mA max current (you can change this to 8mA or 12mA by pinctrl), so if your external circuit draws or feeds more the 4mA, the pin will be pulled low/high regardless of output value. (Output value would still switch the 4mA current of course).

HTH,
Harald

Numtem

 I found what was the problem. it seems like both the SSP2_SCK and UEXT_CS pins are used by the SPI driver so I crossrecompiled again the kernel without SPI support and it´s working now.

I have to be attention to kernel updates!!!