Hi Wendy, tnx for the response,Do you use GPIO interrupt? Did you write a program to talk with your GPIO controller?Yes it uses interupts i think, and i currently have a program that successfully outputs data onto the expansion ports. The crash occurs when i rebuild after enabling BiDIR
Do you know whether there is input from the GPIO controller at that very early kernel boot stage?i dont really know enough to comment about this, all i can say is i have not made any changes to affect the normal boot process.TnxOn Wed, Apr 8, 2009 at 9:38 PM, Wendy Liang <wendy.liang@xxxxxxxxxxxxx> wrote:
Hi Sir ,
I tested the bi-directional GPIO with Spartan3a DSP 1800a using the 8 LEDs as a bi-directional GPIO. petalinux is successfully booted and the gpio-test runs successfully.
PetaLinux uses xilinx_gpio as the gpio driver.
Do you use GPIO interrupt? Did you write a program to talk with your GPIO controller?
Do you know whether there is input from the GPIO controller at that very early kernel boot stage?
Best Regards,
WendyOn Wed, Apr 8, 2009 at 8:03 PM, Sir Nigel Loring <sir.nigel.loring@xxxxxxxxx> wrote:
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.