GPIO settings in MPC8323E-RDB

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

GPIO settings in MPC8323E-RDB

1,043 次查看
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 回复数

875 次查看
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 项奖励
回复

875 次查看
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 项奖励
回复