how to configure mux and gpios

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

how to configure mux and gpios

ソリューションへジャンプ
3,418件の閲覧回数
sadasivam
Contributor I

How to access gpio from user space, i have sabre-sdb EVB. kindly point some documents/datasheets, it will be helpful for me.

Sada

ラベル(2)
0 件の賞賛
返信
1 解決策
2,836件の閲覧回数
AnsonHuang
NXP Employee
NXP Employee

Hi,

     for DL, it is in arch/arm/mach-mx6/board-mx6dl_sabresd.h, for i.MX6Q, it is arch/arm/mach-mx6/board-mx6q_sabresd.h. You need to set the intial status of all pins.

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
2,836件の閲覧回数
AnsonHuang
NXP Employee
NXP Employee

Hi, Sada

     From linux Document, Documentation/gpio.txt, it will tell how to control a GPIO from userspace.

0 件の賞賛
返信
2,836件の閲覧回数
sadasivam
Contributor I

The below GPIO has been configured as used as LED in the EVB.

#define SABRESD_USR_DEF_RED_LED    IMX_GPIO_NR(1, 2)

when i tried to export the same as per GPIO.txt

getting below error

echo 2 > export

sh: write error: Device or resource busy

I also tried with another GPIO3[15].

which is already set as Input. I am able to change direction of that particular pin. but not able to make changes in value. Value always remains 0.

what am i missing to do????

0 件の賞賛
返信
2,836件の閲覧回数
AnsonHuang
NXP Employee
NXP Employee

You may need to check this pin's IOMUX, normally it is not set as GPIO mode. And GPIO driver will not handle the MUX setting.

0 件の賞賛
返信
2,836件の閲覧回数
sadasivam
Contributor I

I tried to find how to change the MUX mode in target board, but didnt find any details.  Kindly advice how to check/modify the IO mux. Can it be changed after login??

0 件の賞賛
返信
2,837件の閲覧回数
AnsonHuang
NXP Employee
NXP Employee

Hi,

     for DL, it is in arch/arm/mach-mx6/board-mx6dl_sabresd.h, for i.MX6Q, it is arch/arm/mach-mx6/board-mx6q_sabresd.h. You need to set the intial status of all pins.

0 件の賞賛
返信