cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer
Observer
5,054 Views
Registered: ‎04-03-2008

No input or output on GPIO_IO signal.

Jump to solution

Hi.

 

I cannot seem to get any output, nor input on the GPIO_IO signal.

 

I'm trying to implement this in a MicroBlaze softcore on a Spartan 3e FPGA. I'm using EDK 9.2i

 

During the BSB i setup a 1 bit wide GPIO as Bidirectional. (in turn, this will be expanded to a 8 bit wide bidirectional). Below is giving a snippet of the generated .mhs file:

 

Edit: Download file snippets: http://peecee.dk/upload/download/182242 

 

# PORT fpga_0_Generic_GPIO_GPIO_d_out_pin = fpga_0_Generic_GPIO_GPIO_d_out, DIR = O, VEC = [0:0]# PORT fpga_0_Generic_GPIO_GPIO_in_pin = fpga_0_Generic_GPIO_GPIO_in, DIR = I, VEC = [0:0]# PORT fpga_0_Generic_GPIO_GPIO_t_out_pin = fpga_0_Generic_GPIO_GPIO_t_out, DIR = O, VEC = [0:0] PORT fpga_0_Generic_GPIO_GPIO_IO_pin = fpga_0_Generic_GPIO_GPIO_IO, DIR = IO, VEC = [0:0]...BEGIN xps_gpio PARAMETER INSTANCE = Port1 PARAMETER HW_VER = 1.00.a PARAMETER C_ALL_INPUTS = 0 PARAMETER C_GPIO_WIDTH = 1 PARAMETER C_IS_BIDIR = 1 PARAMETER C_IS_DUAL = 0 PARAMETER C_BASEADDR = 0x81420000 PARAMETER C_HIGHADDR = 0x8142ffff BUS_INTERFACE SPLB = mb_plb# PORT GPIO_d_out = fpga_0_Generic_GPIO_GPIO_d_out# PORT GPIO_in = fpga_0_Generic_GPIO_GPIO_in# PORT GPIO_t_out = fpga_0_Generic_GPIO_GPIO_t_out PORT GPIO_IO = fpga_0_Generic_GPIO_GPIO_IOEND

 

 Below is given a snippet of the application code:

 

 

#include "xgpio.h"#include "xparameters.h"int main(){ XGpio port1; XGpio_Initialize(&port1, XPAR_PORT1_DEVICE_ID); XGpio_SetDataDirection(&port1, 1, 0x0); while(1) { XGpio_DiscreteSet(&port1, 1, 0x1); usleep(2000); XGpio_DiscreteClear(&port1, 1, 0x1); usleep(2000); } return 0;}

 

 I've tried writing diretctly to the "GPIO_DATA" and "GPIO_TRI" registers, but same result. And besides that I've tried using the "XGpio_DiscreteWrite" function - still no result.

 

I've downloaded an application note (http://www.xilinx.com/support/documentation/application_notes/xapp1042.pdf) which uses a bidirectional GPIO. I cannot seem to find any differences between the app note, and my system.

 

Any ideas on what the issue(s) might be, and how to move past them?

 

Best regards

Kasper 

 

 Edit: Okay, apparently the [code]-tags didn't help much... No linebreaks. I've uploaded the file "CodeSnippets.txt" which hopefully is a bit more readable :) 

Message Edited by lhadrepsak on 07-23-2009 06:08 AM
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Observer
Observer
6,184 Views
Registered: ‎04-03-2008

Re: No input or output on GPIO_IO signal.

Jump to solution

Well everything's working perfectly now - I forgot to make the application initialize the BRAM... DOH!

 

But anyways - thanks for your replies!

 

//Kasper 

View solution in original post

0 Kudos
4 Replies
Highlighted
5,041 Views
Registered: ‎08-21-2008

Re: No input or output on GPIO_IO signal.

Jump to solution

hello.

This may help you.

http://forums.xilinx.com/xlnx/board/message?board.id=EDK&thread.id=9967 

Best of luck.
--
Unlimited in my Limits.
0 Kudos
Highlighted
Observer
Observer
5,029 Views
Registered: ‎04-03-2008

Re: No input or output on GPIO_IO signal.

Jump to solution

Hi prateek_bhatt

 

I have crosschecked my current MHS and UCF files with a fully working design using a non-bidirectional GPIO. The reset and clock instances/pins are identical with my current nonworking design.

 

It seems that an extra "space" has sneaked its way into your link, so for future reference: http://forums.xilinx.com/xlnx/board/message?board.id=EDK&thread.id=9967

 

//Kasper 

Message Edited by lhadrepsak on 07-24-2009 12:55 AM
0 Kudos
Highlighted
5,026 Views
Registered: ‎08-21-2008

Re: No input or output on GPIO_IO signal.

Jump to solution

Hello.

Sorry for the extra space.

Do check your MHS file against mine that i have pasted. That is a working one.

And yes i have used bidirectional GPIO.  No non-bidirectional.

 

Best of luck.
--
Unlimited in my Limits.
0 Kudos
Highlighted
Observer
Observer
6,185 Views
Registered: ‎04-03-2008

Re: No input or output on GPIO_IO signal.

Jump to solution

Well everything's working perfectly now - I forgot to make the application initialize the BRAM... DOH!

 

But anyways - thanks for your replies!

 

//Kasper 

View solution in original post

0 Kudos