GPIO settings in MPC8323E-RDB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GPIO settings in MPC8323E-RDB

528 Views
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
Tags (2)
0 Kudos
2 Replies

361 Views
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 Kudos

361 Views
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 Kudos