GPIO settings in MPC8323E-RDB

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

GPIO settings in MPC8323E-RDB

1,063件の閲覧回数
narreddisivapra
Contributor II
Hello,
   Can any one help me in access to GPIO pins. I didn't get gpio.h file in Linux. I am using MPC8323E-RDB board, 2.6.27 kernel and built using LTIB with a ubuntu 8.10 PC. I checked .dts file but it is not having any node for gpio in it.
I tried to access the registers of IO ports based on the address provided in Ref. Manual, but It is giving segmentation fault. I given as follows..

unsigned char* x = (unsigned char*) 0xE0001440
(here 1440 is the offset address of the port-a's Open Drain Register)

after this I used mmap() to access the location in virtually.
Can you please help me in making GPIO pins to use.
Thanks and Regards,
Siva Prakash Reddy N
タグ(2)
0 件の賞賛
返信
2 返答(返信)

895件の閲覧回数
Pavel
NXP Employee
NXP Employee

Usually sysfs is used for GPIO using under Linux.

NXP LTIB Linux BSP does not support sysfs.

Use mmap for GPIO using. See attached file. It is simple program example for the MPC5121 board. Use similar code for the MPC8323 GPIO.


Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

895件の閲覧回数
narreddisivapra
Contributor II

Is it not required to change .dts file for gpio.?

If I change .dts, will it reflect.? then how can I add gpio in MPC832x_rdb.dts file.?

0 件の賞賛
返信