[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] Re: Controlling the Expansion port as a GPIO with Petalinux



follow - up on this issue, the system seems to be working fine on standalone microblaze, i.e. without petalinux. i am able to carry out read and write fine.

On Tue, Apr 7, 2009 at 11:36 PM, Sir Nigel Loring <sir.nigel.loring@xxxxxxxxx> wrote:

I am not quite sure if this query belongs here or the xilinx forums but here goes.

 

I am working on a project on virtex 2 pro development board, where i am required to control the expansion ports, i chose to use a GPIO device as the controller, and it works fine for output. I was able to do this while running petalinux on the FPGA as well. However when i try to use the pins as inputs from outside, i run into trouble. 

 

Initially C_is_bidir was set to 0. However when i changed it to 1 in order to use some of the pins as input, the petalinux OS started hanging during boot after a few messages, as follows

 


Found romfs @ 0x441bb000 (0x001d4000)
#### klimit 0x441cf000 ####
Moving 0x001d4000 bytes from 0x441bb000 to 0x441ce6dc
New klimit: 0x443a3000

(ignore the numbers themselves, this was copy paste from forum entry as i am not in my lab atm)

 

If i changed C_IS_BIDIR to 0, linux is back up and running without any problem. 

 

I then figured, id see if all inputs worked, that way i could configure 2 gpio devices, 1 only for input and 1 for output. I changed C_IS_BIDIR, and C_ALL_INPUTS to 1 and again the above problem occured. I even tried to regenerate addresses when i did the first setup(bidir=1) however the problem persisted.

 

So heres the question, am i doing something wrong or is this something with the way the GPIO driver under petalinux handles Bidir? I will try with bidir = 1 and without petalinux in the next day or 2 but im kinda rushed for time so wanted to post now.

 

In order to accomplish my goal(1 gpio device, few pins output, 1 pin input) is this the way i should be going about it? is there some better way? 

Is it possible to configure the 2 channels of the GPIO as input and output on the same pins? (im still not fully  clear on the topic of channels)

 

Thanks for your time.