GPIO as Output isue

Started by azuolas, October 16, 2013, 11:38:23 AM

Previous topic - Next topic

azuolas

hi,

I am using gpioMMap.h for iMX233-micro GPIO control. I want to use pins 24-27(GPIO 92 91 23 25 according to https://docs.google.com/spreadsheet/ccc?key=0AspkrcYcY5bWdFB6WC1xRlp5bFRjc1hwVnlQZDVmeUE#gid=0 ) as outputs. pins 26 and 27 work fine. pin 25 on startup is in high state. I can change state to low level, but I can't it set back to High level. pin 24 do not take any action. could it be that kernel does not allow to control these pins? I am using default imx23-olinuxino.dts file. if it is not kernel, what should I check?

Fadil Berisha

Quote from: azuolas on October 16, 2013, 11:38:23 AM
could it be that kernel does not allow to control these pins? I am using default imx23-olinuxino.dts file.

Hi azuolas,

Yes. Kernel allow you to export pin state on user space only for pins declared on imx23-olinuxino.dts as GPIO. You need to adapt imx23-olinuxino.dts for your needs, recompile dts file and create new image to boot your board.
Does this answer your question?

Fadil Berisha




azuolas

thank you Fadil Berisha,

yes, this answer my question where is the problem. but could you point me please, how the imx23-olinuxino.dts file should be modified. I am not quite familiar whit this. in my imx23-olinuxino.dts file I do not see where GPIOs 23, 25 is defined, but they work fine. how should I define GPIOs 91 and 92?

Fadil Berisha

#3
Quote from: azuolas on October 16, 2013, 06:01:05 PM
thank you Fadil Berisha,

yes, this answer my question where is the problem. but could you point me please, how the imx23-olinuxino.dts file should be modified.

As answer in your question I wrote mini howto and published on my web blog page:

http://g-lab.ca/how-should-i-define-gpios/

If you  think that my answer were correct or useful in this thread, please mark it with + .

Fadil Berisha

azuolas

Thank you,

it is really helpful

Fadil Berisha

I am happy to help

Fadil Berisha
g-lab.ca